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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ranking

how to use ranking in the qlik view???

i have a column named country and other as population. i want to  show the top 5 countries on the basis of population through a bar chart. how to use the ranking expression in it??

Labels (1)
1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Try with this expression

=Only({<Country={"=Rank(Population)<6"}>} Population)

     Or

     If your using QV 9

       use expression as Only(Population)

      Then go to the properties-->Presentation-->under dimension limitations check the option max visible number and set as 5.This requires to be sort by y value descending.

     Or

     for 10 and 11

     use dimension limits

Celambarasan

View solution in original post

2 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Try with this expression

=Only({<Country={"=Rank(Population)<6"}>} Population)

     Or

     If your using QV 9

       use expression as Only(Population)

      Then go to the properties-->Presentation-->under dimension limitations check the option max visible number and set as 5.This requires to be sort by y value descending.

     Or

     for 10 and 11

     use dimension limits

Celambarasan

Jason_Michaelides
Partner - Master II
Partner - Master II

I don't think you need to use ranking for this.  Just sort your bar chart by population descending and limit the displayed values to 5.

Hope this helps,

Jason