Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I got the below code from Qlik community to find the top 10 customers for a particular year.
=IF(
aggr(
rank(total
aggr( sum( {$<Year={$(=Max(Year)-1)}>} SalValue),itemname)
,0,1)
,itemname)
<=10,
aggr(
rank(total
aggr( sum( {$<Year={$(=Max(Year)-1)}>} SalValue),itemname)
,0,1)
,
itemname))
But, I'm not able to understand anything from this, Could someone please help me step by step on how this code is written?
Regards,
Sidhiq
Where are you trying this? I meant Dimension or Expression?
Expression.
Can you try this as calculated dimension
If(aggr(rank(sum(SalValue)),itemname)<=10,itemname)
and expression is
Sum({<Year = {'$(=AddYears(Max(Year),-1))'}>}SalValue)