Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi All,
i want a text box with top 3 values from my data based on the the expression:
Category ID
Plan A 1
Plan A 2
Plan A 3
Plan A 4
Plan B 5
Plan B 6
Plan C 7
Plan D 8
Plan D 9
Plan D 10
Plan E 11
so basd on the expression count(distinct ID)
i want a text box stating:
Top 3 plan for this month are:Plan A,Plan D and Plan B.
='Top 3 plan for this month are: ' & chr(10) &
concat(if(aggr(Rank(count(DISTINCT ID)),Category)<=3,Category),' ')
='Top 3 plan for this month are: ' & only({<Category={'=rank(count(ID))=1'}>}Category) & ', ' &
only({<Category={'=rank(count(ID))=2'}>}Category) & ' and ' &
only({<Category={'=rank(count(ID))=3'}>}Category)
='Top 3 plan for this month are: ' & chr(10) &
concat(if(aggr(Rank(count(DISTINCT ID)),Category)<=3,Category),' ')
thanks Massimo & Gysbert.
I had one more question using the expression of your i am able to get what i want but is there a possibility that we can place and between second and third category. Using the Expression provided I am able to do the same but if there are 2 Categories having same count on top 3 then it doesnt give any output.
Regards
Saurabh
I had one more question using the expression of your i am able to get what i want but is there a possibility that we can place and between second and third category.
The 'and' between the second and third category is why I posted my expression instead of using concat like Massimo did.