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

Bar Chart conditional color formatting

Hi,

I am trying to build a bar chart where the color will depend of a creteria that goes: if the sum > 40 then 'green' else 'red'. The color area is calculated with the following: "if( Sum (Sales) > 40, green(),red())". It looks like it colors all the bar with the sum condition representing the total on the chart, not the individual bars. What am I missing? In the attached qvw, bars are green when no selection is done, red when for example 'Germany' selected and also red when both 'Germany' and 'Switzerland' selected. If you add 'France', it all turns to green.

Thanks!

12 Replies
Not applicable
Author

Thank you very much!!!

Not applicable
Author

But, if I have done a chart with percentage like this one:perc.jpeg

I have try to insert different colours with this espression: if((count(%ticketid)/count(total %ticketid))*100<80, $(az), $(bl)). . . but it doesn't work well.

where $(az) and $(bl) are 2 colours.

Not applicable
Author

Hi!

Did you get an answer?

I'm trying to create a chart - ticket 1 is supposed to be red, it should show red, and if ticket 2 is green, it should be green. my current condition doesn't seem to work. It's giving me an overall color view.. which is not right