Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Change the colour of a bar based on rank of dimension

Hi All

I want to calculate the rank of dimension and assign colour to the dimension based on dimension rank

is it possible

15 Replies
marjan_it
Creator III
Creator III

you can use it this line for each rank

for example:

=if(rank((Num(((sum(Feild))),'#,##0.0')))=1,Yellow()

,if(rank((Num(((sum(Feild))),'#,##0.0')))=2,Red()

,if(rank((Num(((sum(Feild))),'#,##0.0')))=3,Green()

,if(rank((Num(((sum(Feild))),'#,##0.0')))=4,Blue()

,if(rank((Num(((sum(Feild))),'#,##0.0')))=5,Brown()

,rgb(112,115,200))))))

tresesco
MVP
MVP

No, it won't check the dimension values. Could you post your sample qvw and explain exact requirement?

Not applicable
Author

This expression will calculate for each month and display the colour what i want is i m showing 5 months data in bar chart and every countrry should have unique colour in the entire bar chart chine sould be red in jan feb march april

Japan should be other color say yellow in all the months

Not applicable
Author

Hi tresesco my main requinent is to calculate rolling sums the last 6 months wen i click on current month

tresesco
MVP
MVP

You could be helped best with a sample qvw. Try and see if you can share one.

Not applicable
Author

Oh, ok then aggregate the data with country dimension instead of month