Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
cliff_clayman
Creator II
Creator II

Limiting the amount of rows returned in a straight table

I have a straight table that I would like to return only the Top 10 totals.  How do I limit the results to the top 10 in descending order?  I've attached a sample file that should help.  I need it by Division, meaning I expect to see the top ten Supplier Names by Division.

1 Solution

Accepted Solutions
sunny_talwar

May be use dimension limits in that case

Capture.PNG

Expression will stay as your original expression

Sum({$<[FY]={$(vFY)}, [Country]={'US'}, [Flag]={'x'}>} [Total])

View solution in original post

8 Replies
sunny_talwar

In a table box or straight table?

cliff_clayman
Creator II
Creator II
Author

Straight table.  I just put in a table box just to display the data.  There would normally be a Sum on the Total field.

sunny_talwar

May be using this expression:Capture.PNG

=If(Rank(TOTAL Sum(Total), 1, 1) < 11, Sum(Total))

cliff_clayman
Creator II
Creator II
Author

I guess I should have left my expression in as I am not sure how to implement the Rank function into it:

Sum({$<[FY]={$(vFY)}, [Country]={'US'}, [Flag]={'x'}>} [Total])

sunny_talwar

May be like this:

=If(Rank(TOTAL Sum({$<[FY]={$(vFY)}, [Country]={'US'}, [Flag]={'x'}>}Total), 1, 1) < 11, Sum({$<[FY]={$(vFY)}, [Country]={'US'}, [Flag]={'x'}>}Total))

cliff_clayman
Creator II
Creator II
Author

This only gave me the Top Ten overall.  I need the Top Ten for each Division.

sunny_talwar

May be use dimension limits in that case

Capture.PNG

Expression will stay as your original expression

Sum({$<[FY]={$(vFY)}, [Country]={'US'}, [Flag]={'x'}>} [Total])

cliff_clayman
Creator II
Creator II
Author

That did it!  Thank you.  I thought I had to do that on the expression.  I didn't realize it would work that way for a dimension.