Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

qlik sense stacked bar chart color expression

Hi

I have a stacked bar chart.my data looks like below.My stack bar contains Discussion, replies,wiki per author. I want to use blue color for Discussion, green for replies, red for wikis something like that. How do i write expression for this scenario and if i use custom expression does legend appear ?

Can you please help on this

Author     Type               Count

Jack       DIscussion          10

Mike       Discussion          20

Mike        Replies               30

Roger      Wiki                   10

Jack        Wiki                   20

Jack        Replies               20

Thanks

1 Solution

Accepted Solutions
vigneshvs
Contributor II

Re: qlik sense stacked bar chart color expression

PFA

4 Replies
vigneshvs
Contributor II

Re: qlik sense stacked bar chart color expression

Hi Vamsi,

Try the custom expression like "if(Type='Discussion',blue(),if(Type='Replies',Green(),Red()))"

By default when you use custom expression the legend wont appear...

If you want the legend to appear then go by the custom color by dimension - type

Hope this helps

Thanks,

Vignesh

Not applicable

Re: qlik sense stacked bar chart color expression

Hi

Thanks for reply. I tried and i am not getting desired behavior. Did you use anything for measures. Did you add Type as measure or anything specific?

I am always getting Last mentioned color. I believe i am doing something wrong in measures so that my expression is not recognizing.

vigneshvs
Contributor II

Re: qlik sense stacked bar chart color expression

PFA

Not applicable

Re: qlik sense stacked bar chart color expression

Thanks. I did mistake when forming stacked chart. Thanks for help giving qvf