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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
s10157754
Creator III
Creator III

How to make lowest 3 bars in a bar chart to be red color?

Dear Qlikview Expert,

I know this might be easy for you but I have faced difficulties in writing conditional syntax under (expression tab->expression->background color to sort my lowest 3 bars in a bar chart to be in RED color. The picture below shows how my bar chart looks like. 

1.PNG

In my bar chart, I only have 1 dimension (Product Number) and 1 expression (Success Rate).

However my expression is a fraction. E.g. ((count(valueA) / count(valueB) + count(valueC))*100)

So in this case, I would like to show product number 149, 109 & 163 to be in Red color, any ideas from you would be greatly appreciated!  

Best Regards,

Qian Ning

1 Solution

Accepted Solutions
sunny_talwar

Use this in your background color expression

If(Rank(-((count(valueA) / count(valueB) + count(valueC))*100)) < 4, LightRed(), Yellow())

Update: Note a small minus before the actual expression inside the Rank() function

View solution in original post

4 Replies
sunny_talwar

Use this in your background color expression

If(Rank(-((count(valueA) / count(valueB) + count(valueC))*100)) < 4, LightRed(), Yellow())

Update: Note a small minus before the actual expression inside the Rank() function

vishsaggi
Champion III
Champion III

May be try this in your background color expr:

= IF(((count(valueA) / count(valueB) + count(valueC))*100) < Min(((count(valueA) / count(valueB) + count(valueC))*100), 4), LightRed(), LightBlue())

prat1507
Specialist
Specialist

Use

=if(rank(- ((count(valueA) / count(valueB) + count(valueC))*100),Product Number)<=3,red(),blue())

s10157754
Creator III
Creator III
Author

Thanks Sunny,

Your solution works perfectly for me! Thank you so much for your precious time!

Best Regards,

Qian Ning