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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
cafcptg2011
Creator
Creator

Filtering the top 5 sales from a pivot table

Hi,

I need to filter the customers (from a top 5 sales pivot table) that has sales in 2011 and 2012 (and exclude the others customers). To understand better i show you a picture with my problem. Also, i attached qvw with pivot table.

Can anyone one help me please?

Thanks in advance,

Cafc

SalesFilter.png

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try:

= if(aggr(rank(SUM (sales ),0),id)<=5

          and aggr(sum({$<y={'2011'}>} sales),id) > 0

          and  aggr(sum({$<y={'2012'}>} sales),id) > 0, id)


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try:

= if(aggr(rank(SUM (sales ),0),id)<=5

          and aggr(sum({$<y={'2011'}>} sales),id) > 0

          and  aggr(sum({$<y={'2012'}>} sales),id) > 0, id)


talk is cheap, supply exceeds demand
cafcptg2011
Creator
Creator
Author

Hi, it works!!

Thank you very much!