Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI All,
I have to show top 3 products which have top 3 sales in a year ,
Can anybody guide me How to write expression using rank() function..to get top 3 prodcuts ..
Regards
Nani
aggr(only({<Product={'=rank(sum(Sales))<4'}>} Product),Product)
Hi
To get the product name of the top 3 products, something like:
Top ranked:
=FirstSortedValue(Product, -Sum({<Year = {2014}>} Sales), 1)
2ns
=FirstSortedValue(Product, -Sum({<Year = {2014}>} Sales), 2)
3rd
=FirstSortedValue(Product, -Sum({<Year = {2014}>} Sales), 3)
HTH
Jonathan
EDIT: I see you want it in a list box. Use Gysbert's expression.
Hi , Gysbert it is not working ...
Regards
Nani
Hi Nani,
Please try this:
=aggr(if(Rank(sum(Sales))<=3,Sales,Sales)
Thanks,
AS