First of all, I’d like to offer you to watch Sam’s following video on this topic:
I would solve this issue in the following way:
1 - In this case, I wrote two measures: Total Happiness & Country Happiness Measures
Total Happiness Score = SUM(WorldHappiness[Happiness Score])
Country Happiness Ranking = RANKX(All(WorldHappiness[Country]), [Total Happiness Score],DESC)
Then, On canvas, I put slicer based upon years.
As you may see from the table attached, any selection year will cause ranking countries based upon their happiness measure.
- In the second case, I made another measure using rankx, crossjoin and all DAX Functions for year and countries.
Country&Year Ranking = RANKX(CROSSJOIN(ALL(WorldHappiness[Country]), All(WorldHappiness[Year])),[Total Happiness Score],DESC)
I hope it can help you.
P.S. I changed year format to text one.
Forum_Zarbaliyev_World Happiness.pbix (103.3 KB)