Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Problem with bars coloring in calculated dimensions chart

Hello everyone,

I need to show how many sales are 'Good', 'Average' or 'Poor' in each state, I have a bar chart with 2 dimensions state, and a calculated dimension "

=if(sales>2,'Good', if(sales>=0,'Average', If(sales<0,'Poor')))".

For each rate, they have different colors, 'Good' - green, 'Average' - Yellow, 'Poor' - Red. Currently, I am using

"=if(sales2>2,RGB(0,255,0), if(sales2>=0,RGB(255,255,0), If(sales2<0,RGB(255,0,0))))"

in calculated colors expression, it worked well when all the rates 'Good', 'Average' and 'Poor' have value but I have problem when there is no any sales in 'Good' rate which mean greater than 2 in my data. Please help, thanks.

I apologize if my explanation is not clear, below I have attatched with the sample document to help you for better understanding.

Labels (1)
0 Replies