Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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 )
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
70 | |
68 | |
50 | |
32 |
User | Count |
---|---|
117 | |
100 | |
73 | |
65 | |
40 |