The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Salaam All,
Please if you don't mind helping on this, I have a case where i want to rank a text measure [Optimization PCP] where i can get the desire output as in [Optimization RANK].
The case is I want to Rank [Optimization PCP], which is a measure, group by [Name] and [Year-Month].
Date,Year-Month,NAME,PCP Optimization,PCP Optimization Rank
2/1/2023 0:00 | Feb-2023 | A | Increase RPM | 1 |
2/2/2023 0:00 | Feb-2023 | A | Increase RPM | 2 |
2/3/2023 0:00 | Feb-2023 | A | Lower RPM | 1 |
2/4/2023 0:00 | Feb-2023 | A | Increase RPM | 3 |
2/5/2023 0:00 | Feb-2023 | A | Increase RPM | 4 |
2/6/2023 0:00 | Feb-2023 | A | Increase RPM | 5 |
2/7/2023 0:00 | Feb-2023 | A | Increase RPM | 6 |
2/8/2023 0:00 | Feb-2023 | A | Increase RPM | 7 |
2/9/2023 0:00 | Feb-2023 | A | Lower RPM | 2 |
2/10/2023 0:00 | Feb-2023 | A | Lower RPM | 3 |
2/11/2023 0:00 | Feb-2023 | A | Increase RPM | 8 |
2/12/2023 0:00 | Feb-2023 | A | Lower RPM | 4 |
2/13/2023 0:00 | Feb-2023 | A | Increase RPM | 9 |
2/1/2023 0:00 | Feb-2023 | B | Increase RPM | 1 |
2/2/2023 0:00 | Feb-2023 | B | Increase RPM | 2 |
2/3/2023 0:00 | Feb-2023 | B | Lower RPM | 1 |
2/4/2023 0:00 | Feb-2023 | B | Increase RPM | 3 |
2/5/2023 0:00 | Feb-2023 | B | Increase RPM | 4 |
2/6/2023 0:00 | Feb-2023 | B | Increase RPM | 5 |
2/7/2023 0:00 | Feb-2023 | B | Increase RPM | 6 |
2/8/2023 0:00 | Feb-2023 | B | Increase RPM | 7 |
2/9/2023 0:00 | Feb-2023 | B | Lower RPM | 2 |
2/10/2023 0:00 | Feb-2023 | B | Lower RPM | 3 |
Your help is highly appreciated.
Thanks and Regards
Saud
Hi, Try this if it helps you :
Optimization Rank =
RANKX(
FILTER(
ALL('YourTable'[Name], 'YourTable'[Year-Month]),
'YourTable'[Name] = MAX('YourTable'[Name]) && 'YourTable'[Year-Month] = MAX('YourTable'[Year-Month])
),
[Optimization PCP],, DESC, Dense
)
kindly accept as a solution if it works with you