Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Top 10 customer available in last month but not in Current month

Hi All, Can Anyone help me to get Top 10 customer from last month those are out from the list of top 10 customer of Current month. Let say i am having Top 10 customer for Jan-2011, And Top 10 customer for Feb-2011 Now i want those customer only those are present in jan top10 list but not in Feb top 10 list. I am having expression for year like "TOP 10 CUSTOMER IN PREVIOUS YEAR BUT NOT PRESENT IN CURRENT YEAR"

EXPRESSION FOR YEAR SCENARIO:

=IF(
aggr(
rank(total
aggr( Sum( {<Year={"$(=year(Max(TRANSACTION_DATE))-1)"}>}
SalesDetail_Amt),CUSTOMER_ID)
,0,1)
,CUSTOMER_ID)
<='$(VTop)',
IF(
aggr(
rank(total
aggr(Sum( {<Year={"$(=year(Max(TRANSACTION_DATE)))"}>}
SalesDetail_Amt),CUSTOMER_ID)
,0,1)
,CUSTOMER_ID)
>'$(VTop)'
OR
ISnull(aggr(
rank(total
aggr(Sum( {<Year={"$(=year(Max(TRANSACTION_DATE)))"}>}
SalesDetail_Amt),CUSTOMER_ID)
,0,1)
,CUSTOMER_ID))
=-1,
CUSTOMER_ID))

0 Replies