Discussion Board for collaboration related to QlikView App Development.
I am slightly confused with two expressions as they produce the same result even though they look different:
Expression 1: rank(aggr(sum(Sale),Item)) - This makes more sense to me as my understanding says aggr() creates a virtual table and then Rank() is performed on that
Expression 2: aggr(rank(sum(Sale)),Item) - It produces the same result as above but how it is working? I am bit confused as rank() is embedded in aggr(). Could you please help me understand?
You don't need Aggr here if you simple want Rank..
You can write
Rank(SUM(Sale),4)
But when you select Any single Item you will get Rank always 4.
So to get the Rank ignoring your Item selection, you can use below expression
Aggr(Num(Rank(Total Sum({<Item = >}Sale),4)),Item)
Thanks for the pointers. I just finished reading them but still I am left with the same question...does the expression evaluation starts from within...that is rank(sum(Sale)) is computed first and then aggr() is performed on that...It looks like a dumb question but I am eager to learn it
Hi,
these two expressions gives the same result but the right way is to use is
if(aggr(rank(sum(sales))>1,item),item)