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: 
helge_jorg
Creator
Creator

Rank 10 highest values in a table with two dimensions

Qlik experts

I would like to rank my measures to only show the 10 largest values in a table.

My dimesion is Date and [Navn]

The measure is avg({<ElementID= {TAX}>} [Verdi])

Thanks!

Cheers

Helge

1 Solution

Accepted Solutions
sunny_talwar

Top 10 for each Date or overall top 10 across both the dimensions? If it is over all top 10.. then try this

If(Rank(TOTAL Avg({<ElementID= {TAX}>} [Verdi])) < 11, Avg({<ElementID= {TAX}>} [Verdi]))

View solution in original post

13 Replies
brunobertels
Master
Master

Hi

May be this as mesure

If(

Rank(

          avg({<ElementID= {TAX}>} [Verdi]) ) > 10 ,


          avg({<ElementID= {TAX}>} [Verdi])

)

sunny_talwar

Top 10 for each Date or overall top 10 across both the dimensions? If it is over all top 10.. then try this

If(Rank(TOTAL Avg({<ElementID= {TAX}>} [Verdi])) < 11, Avg({<ElementID= {TAX}>} [Verdi]))

helge_jorg
Creator
Creator
Author

Hi, Bruno

Your measure expression did not work as I was hoping for. The expression greys out the then highest values, and the rest is displayed. In addition, the table includes the entire record of measures.

helge_jorg
Creator
Creator
Author

Hi, Sunny

Top 10 for each date, not both dimensions. Your expression works fine, the top 10 values are listed. But the rest of the values in the table is grey. It there a way to only show the top 10 values in the table, and exclude the rest?

sunny_talwar

Can you share an image of what you are seeing?

sunny_talwar

Try this for top 10 for each date

If(Rank(Avg({<ElementID= {TAX}>} [Verdi])) < 11, Avg({<ElementID= {TAX}>} [Verdi]))

brunobertels
Master
Master

sorry my bad

try this

If(

Rank(

          avg({<ElementID= {TAX}>} [Verdi]) ) < 11 ,


          avg({<ElementID= {TAX}>} [Verdi])

)

helge_jorg
Creator
Creator
Author

Top 10 records.PNG

sunny_talwar

Do you have more then 1 measure in your chart? If you do... then use the same condition for all the expressions

If(Rank(Avg({<ElementID= {TAX}>} [Verdi])) < 11, Measure1)

If(Rank(Avg({<ElementID= {TAX}>} [Verdi])) < 11, Measure2)

etc

and also, make sure that you have unchecked 'Include Zero Values' under Add-Ons -> Data Handling.