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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
stantrolav
Partner - Creator II
Partner - Creator II

Set analisys for top values in pivot table

How can I bring TOP 8 values ​​for the given expression and 2 additional values ​​specified manually in the pivot table? I think i should use set analisys in dimension or expression.

I got 25 values of Product. To every product i have Amount. In pivot tabe i used Product as dimension and expression sum(Amount).

How can i get something like this:

Productsum(Amount)
INHALIPT2356
ANTI ANGIN2145
HEXORAL1876
CAMETON1500
STOPANGIN1400
TANTUM VERDE1238
STREPSILS786
FALIMINT652
SEPTOLETE23
STREPSILS PLUS6
Others769

Could someone help with this simple task?

10 Replies
stantrolav
Partner - Creator II
Partner - Creator II
Author

That's it. Ok. Here is final answer from FABRICE44

Dimension:

=Aggr(If(Rank(Sum([Amount]))<=8 or Product='microscope' or Product='backgammon', Product, 'Others...'), Product)

Sort order:

=Aggr(If(Rank(Sum([Amount]))<1000, Sum([Amount]),-1), Product)


We use 1000 in sort order to specify that Others... should be the last from at least of 1000 values.