Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I needed two measures to know current year ranking and previous year ranking from the data below:
Country Name | Ranking | Year |
India | 12 | 2019 |
India | 10 | 2020 |
US | 2 | 2020 |
US | 1 | 2019 |
Please help me to achieve this.
Thanks
Solved! Go to Solution.
Proud to be a Super User!
Proud to be a Super User!
Hi @Anonymous
try
CurrentYear = CALCULATE(MAX(Table[Ranking]), Table[Year] = YEAR(TODAY()) )
and
PrevYear = CALCULATE(MAX(Table[Ranking]), Table[Year] = YEAR(TODAY())-1 )
User | Count |
---|---|
84 | |
79 | |
70 | |
47 | |
41 |
User | Count |
---|---|
108 | |
52 | |
50 | |
40 | |
40 |