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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Limiting records

Hi Al,

Ok, So what is the best way to limit a set of data when not using a pivot table? For example i'd like to select say the top 4 records from my data as in an expression. So in this example i have a historical list of values ordered by date and i only want to see the latest 4 accumulated. Additonally i don't want to use the date as a dimension.

It's fairly easy to do in a pivot table, as you can use the After function with a RangeSum but not sure of the best approach in a chart object without the date dimension.

Quick example: [Date, Value]

01/06/2009, 1.5

01/05/2009, 2

01/04/2009, 1.2

01/03/2009, 0.5

01/02/2009, 7

So in this case i want the Top 4 entries (1.5 + 2 + 1.2 + 0.5)

Jamie

1 Reply
Not applicable
Author

Hi Jamie,

You have a couple of options:

[1] You cold go the the chart properties->Presentation->Max Number. There you can specify a number or an expression. This only has an impact on the number of bars/lines that you display, but the totals displayed using ALL the data. Use it in conjunction with 'Show other rows'.

[2] You could keep the date as a dimension, but hide it using chart properties->Presentation->Hide Column.

[3]You could set a ranking in the table: rank (max(Date)) and then do a set analysis using the ranking to select only rank 1-4.

Hope this help.