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:
I tried with:
I tried combining if, rank and aggr but with no luck yet.
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:
I hope this help you.
Hi Luciano. Found the answer.
You solution returns numbers when I need text values.
Retrieving data ...