Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
orangebloss
Contributor III
Contributor III

Restricting values in a table to the top X

Name Max(Pax) Rank(max(Pax))
John 20 1
Mark 19 2
Mabel 18 3
Sarah 15 4

 

I've created a table as above but what I want to show is only the top 3 - I've tried various different ways but haven't quite worked it out?

 

Any help appreciated!

Labels (4)
2 Replies
Padma123
Contributor III
Contributor III

Max({<Name={"=rank(max(Pax))<=3"}>}Pax)

MatheusC
Specialist
Specialist

@orangebloss 

Restricting values the top X by its dimension,

=aggr(only({<Name = {"=Rank(max(Pax), 4)<=3"} >}Name), Name)

In the dimension, uncheck include null values ​​/ Show others

- Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!