Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a problem trying to display the top 5 values per month in a chart. The challenge is due to the fact that the dimension names associated with the highest value can change every month.
I would like the chart to display similar to this, with the dimension Country showing only in top 5 order each month, based on the calculated expression Units.
Jan | Feb | Mar | |||
---|---|---|---|---|---|
Country | Units | Country | Units | Country | Units |
Germany | 122 | France | 105 | Spain | 111 |
France | 97 | Italy | 102 | Germany | 107 |
Spain | 74 | US | 93 | Japan | 105 |
US | 72 | China | 88 | Sweden | 90 |
Japan | 65 | Sweden | 80 | Italy | 71 |
Currently my table is showing like this, and can only be sorted by month individually.
Country | Jan | Feb | Mar |
---|---|---|---|
Germany | 122 | 72 | 107 |
France | 97 | 105 | 63 |
Spain | 74 | 68 | 111 |
US | 72 | 93 | 51 |
Japan | 65 | 77 | 105 |
The basic expression I'm using for each month is as follows:
=sum({<[Month]={'Jan'}>} [Units])
Is there a way to rank countries for each month separately and have the fields display accordingly?
Thanks very much.
Hi,
I have been trying to find a solution to this, but with no success so far.
Does anyone have any suggestions?
Thanks again.
Hi,
try the below expression
=Aggr(Rank(Sum(units)), Month)<=5
Hi Soumya,
Thanks for the susggestion. Unfortunately, this expression is not returning any values however.