Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
pascos88
Creator II
Creator II

Show in a Qlik table only the first 5 Company with the biggest values

Hi all, 

I am looking for a set analysis in order to show in a table only the first 5 company with the biggest (max) values. 

Company  Values

A                   100

B                   99

C                  99

D                 97

E                96

 

All the rest of the companies shouldn't showing up, 

Thank you for any help 

 

Best

Labels (1)
1 Solution

Accepted Solutions
jyothish8807
Master II
Master II

Try this:

if(Aggr(Rank(Sum(Value)),Company ) <=5,Sum(Value))

Best Regards,
KC

View solution in original post

7 Replies
richard_chilvers
Specialist
Specialist

Check out the 'Dimension Limits' tab in your chart.
pascos88
Creator II
Creator II
Author

Thanks for the answer. 

Can you please give to me a bit more details? 

Best

jyothish8807
Master II
Master II

Try this:

if(Aggr(Rank(Sum(Value)),Company ) <=5,Sum(Value))

Best Regards,
KC
pascos88
Creator II
Creator II
Author

Sorry again, 

If I also would like to have the lowest 5?  what will change in the formula? 

jyothish8807
Master II
Master II

Try this 🙂

if(Aggr(Rank(-Sum(Values)),Company) <=5, Sum(Values))

Best Regards,
KC
pascos88
Creator II
Creator II
Author

Works perfectly. 

Thanks a lot 🙂 

jyothish8807
Master II
Master II

You are welcome 🙂

Best Regards,
KC