Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Anonymous
Not applicable
Author

4 Replies
Anonymous
Not applicable
Author

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
Author

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.

Anonymous
Not applicable
Author

PFA

Not applicable
Author

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