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
Hello,
I've reached out to two experts on this, and neither has been able to figure this one out.
I have a basic RANKX formula, ranking Sales:
Solved! Go to Solution.
Hi, @TMoney
I'm sorry for replying so late, I've just seen your message.
Please checked the attached pbix file. You may need to modify the measure formula like:
New Rank Basic =
VAR tab =
ADDCOLUMNS (
ALLEXCEPT('aims teams','aims teams'[Index]),
"SUM.$Sales", [SUM.$Sales],
"_Rank basic", [Rank basic]
)
RETURN
MINX(tab, [_Rank basic] )
Best Regards,
Community Support Team _ Eason
Hi,
I tried using this formula above but I am getting the rank to show as 1 for everything. This is because it is calculating the minimum value of the rank column which is 1. Any ideas on how to solve this?
Have you managed to solve this issue becasue I have the same problem and could not find a solution.
Yes. See the solution below.
Tried to apply your query in my visual but did not work.
Basically, I am trying to do a hotel benchmark analysis in terms of their occupancy rates.
As you see below, the MATRIX rank and CARD rank are not matching.
I have 2 slicers that show hotel names and locations. In some cases, I would like to increase my sample size by choosing more than one location (it's A+B locations in my below sample ) but the rank level seems incorrect when I chose multiple locations.
I chose Hotel 2, It's rank should be 2 under location A and 3 under location A+B but CARD shows the rank as 2 for both situations.
Hi, @TMoney
It might be related to the formula of [SUM.$CFLV Sales].
Please provide a sample pbix for further research.
Best Regards,
Community Support Team _ Eason
Hi, @TMoney
Add a new measure like:
New Rank basic =
VAR tab =
ADDCOLUMNS (
'aims teams',
"SUM.$Sales", [SUM.$Sales],
"_Rank basic", [Rank basic]
)
RETURN
MINX ( tab, [_Rank basic] )
Best Regards,
Community Support Team _ Eason
Thanks for the response. Your [New Rank Basic] measure makes sense (albeit I'm still confused as to why it's a necessary layer on top of RANKX). In any event, it's still not working in my "real" file (I had redacted some info for purposes of posting the sample, but nothing that would seemingly impact results):
I was awaiting a further response to my question (sample file was attached which is still showing the error). On top of trying to solve this particular challenge, I'm really interested in the underlying cause of why RANKX is behaving in this extremely unpredictable and strange way.
Hi, @TMoney
I'm sorry for replying so late, I've just seen your message.
Please checked the attached pbix file. You may need to modify the measure formula like:
New Rank Basic =
VAR tab =
ADDCOLUMNS (
ALLEXCEPT('aims teams','aims teams'[Index]),
"SUM.$Sales", [SUM.$Sales],
"_Rank basic", [Rank basic]
)
RETURN
MINX(tab, [_Rank basic] )
Best Regards,
Community Support Team _ Eason
Hi! I'm having the same problem as the original poster but, when I try this measure in a visual, it keeps loading forever. Do you might know what can be causing this?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 33 | |
| 29 | |
| 26 |
| User | Count |
|---|---|
| 134 | |
| 104 | |
| 63 | |
| 60 | |
| 55 |