Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
WorkFish
Contributor II
Contributor II

how to write expression to change line type in combo chart

Hi Guys

  Hers's the thing:

 For example  I create a combo chart which dimensions are  <FieldA><FieldB>  and expression <FieldC>,and i want it if<FieldA>='a' then show bar chart ,else show line chart;

i found that there is a line type in <propertics- Expression -Field-Line type>,i don't know whether i can use this to implementation my requirement or there has another way.

Anyway my question is how to make bar and line type in one table with just one expression,i know if dimension is only one perhaps i can set two expressions,but now there are two.

if you know the answer please let me know

thanks in advance!

 

 

Labels (1)
1 Reply
Marijn
Creator II
Creator II

Hi @WorkFish,

Could you use two expressions? Then you can make a combo chart with line and bar chart. So if you make an expression like this:

count( {$< FieldA = {'a'}>} value)        -> use bar chart for this expression
count( {$< FieldA -= {'a'}>} value)      -> use line chart for this expression

Then remove FieldA as dimension.

Hope this helps!