Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |