Discussion Board for collaboration related to QlikView App Development.
I have a straight table with Dimension as
Dim: =If(Aggr(Rank(Count(DISTINCT{$<Type={'Sale'}>}(ID))) <= 5,EID),EID)
Expression: Count(DISTINCT{$<Type={'Sale'}>}(ID))
This is to show only top 5 EIDs in the Straight Table that has the most number of IDs
How do I show the top most EID and number of IDs this EID has in a Tex Box?
Hi @qlikwiz123
May be try like below
=FirstSortedValue(EID, aggr(rank(Count(DISTINCT{$<Type={'Sale'}>}ID),4),EID))
which gives Top most EID info.
Or
=aggr(if(Rank(Count(DISTINCT{$<Type={'Sale'}>}ID))=1, EID, EID)
------------
Below exp. gives the number of IDs of that EID
Aggr(If(rank(Count(DISTINCT{$<Type={'Sale'}>}ID),4) = 1, Count(DISTINCT{$<Type={'Sale'}>}ID)),EID)
Hi @qlikwiz123
May be try like below
=FirstSortedValue(EID, aggr(rank(Count(DISTINCT{$<Type={'Sale'}>}ID),4),EID))
which gives Top most EID info.
Or
=aggr(if(Rank(Count(DISTINCT{$<Type={'Sale'}>}ID))=1, EID, EID)
------------
Below exp. gives the number of IDs of that EID
Aggr(If(rank(Count(DISTINCT{$<Type={'Sale'}>}ID),4) = 1, Count(DISTINCT{$<Type={'Sale'}>}ID)),EID)
Works as expected. Thank you very much.
Hi @MayilVahanan ,
Just like FirstSortedValue, do we have anything to show Top 2nd, Top 3rd etc similar to what we show using FirstSortedValue?
Hi @qlikwiz123 ,
You can use rank () function or in firstsortedvalue function itself, u can provide rank..
Pls refer in below link