Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a dimension country.
I want to know for each country in a table, which is the top product with sum(sales)
It should look like this:
Country Product
Mexico A
England B
USA C
France A
I tried with:
I tried combining if, rank and aggr but with no luck yet.
Any ideas?
Regards
Federico
The solution is:
=Aggr(if(Rank( Sum(Sales))=1, Product),Country,Product)
Didn't know that the order matter, I had already tried =Aggr(if(Rank( Sum(Sales))=1, Product),Product,Country)
This is my last idea, but only shows the ranked 1 product disregarding the country
(In a table with country as dimension)
=Aggr(if(Rank( Sum(Sales))=1, Product),Product)
The solution is:
=Aggr(if(Rank( Sum(Sales))=1, Product),Country,Product)
Didn't know that the order matter, I had already tried =Aggr(if(Rank( Sum(Sales))=1, Product),Product,Country)
Try without the IF condition and with Rank out of Aggr function:
Rank(Aggr(Sum(Sales), Product))
I hope this help you.
Luciano.-
Hi Luciano. Found the answer.
You solution returns numbers when I need text values.