Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
MIKIEMILLER
Contributor III
Contributor III

Need bottom 20 results

I have an expression:

Sum([Net Cash])

I need to only show the lowest 20 results of this expression in a table based on the dimension [ID].  I tried this expression, but it brought in the lowest 20 IDs.  I want it to sort by ID based on the 20 lowest Net Cash values.

if(aggr(rank(Sum([Net Cash])),[ID])<=20,[ID])

Qlik Forums Bottom 20.GIF

15 Replies
isingh30
Specialist
Specialist

Did you call stored procedures ?

How to Call stored procedure in Qlikview

Thanks.

MIKIEMILLER
Contributor III
Contributor III
Author

Here is an excel sheet with the exported data from qlik for that table.

dan_sullivan
Creator II
Creator II

Can't you use the built in functionality of the table dimension to just set the limit to return bottom 20?

Screen Shot 2018-05-31 at 12.12.22 PM.png

MIKIEMILLER
Contributor III
Contributor III
Author

Dan,

That does not work because on any given day, some IDs might not have any data, so that just gives me either no data selected or zero values. This is what happens when I say to put a fixed limitation on the bottom 20.

Qlik Forums Bottom 20.3.GIF

dan_sullivan
Creator II
Creator II

can you uncheck the "include null values" and in your data script set the 0's to be null?

MIKIEMILLER
Contributor III
Contributor III
Author

They are unchecked.