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

Announcements
Qlik Named a 7-Time Gartner® Magic Quadrant™ Leader: See the 2026 Report
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show top N rows in table box

Hi There, I'm making a table box that shows rows with top 20 values in the variable called 'Total'.

The table loading query is:

LOAD Specialty as [Product Decile Specialty],

     One as [Product Decile One],

     Two as [Product Decile Two],

     Three as [Product Decile Three],

     Four as [Product Decile Four],

     Five as [Product Decile Five],

     Six as [Product Decile Six],

     Seven as [Product Decile Seven],

     Eight as [Product Decile Eight],

     Nine as [Product Decile Nine],

     Ten as [Product Decile Ten],

     Total as [Product Decile Total]

FROM

(ooxml, embedded labels, table is [Product Decile by Specialty]);

How will I be able to do that?

Thanks a million in advance!

Mira

Labels (1)
1 Solution

Accepted Solutions
sinanozdemir
Specialist III
Specialist III

I guess one way to do this is by adding a button to show only Top 20 Values in Total field:

Capture.PNG

I just copied and pasted from another qvw.

View solution in original post

8 Replies
robert_mika

To store 20 values in variable or to show 20 top in Table box?

Not applicable
Author

use rank function to display top number according to u r requirement.

eg: Rank(sum(sales))   

or

use dimension limit largest 10

Anonymous
Not applicable
Author

In table box you can't make any calculations.

Try like this

in sort tab -->sort-->Select Ascending-->expression-max(Field)

Hope it might helps you

Not applicable
Author

Hi Robert,

To show top 20 in Table box, example:

say the table is long with 100 records:

2015-06-17_1143.png

But what I want to show is, now the table is ranked by the last column "Total", the top 20 rows: Specialty with the Top 20 values in "Total". Like the following:

2015-06-17_1146.png

Not applicable
Author

Hi Balaji, unfortunately there's no dimension limit tab in the table box properties.

Not applicable
Author

Hi rgv rand:

This approach looks promising. Is there a function I can use in expression to have the table only show top n rows?

sinanozdemir
Specialist III
Specialist III

I guess one way to do this is by adding a button to show only Top 20 Values in Total field:

Capture.PNG

I just copied and pasted from another qvw.

Chanty4u
MVP
MVP

hi

use rank(sum(sales)

or in expression in asecnding max(dimension)

hope this helps you

thank you

Suresh