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
Hi!
I need help with the RANKX function. I have one ranking on the fly, that works perfectly on the items that are selected ->>
Among the items, I have my_item and competitor items. There is a column prod_type where 1 -> my_item and 2 -> competitor's.
The idea of the report is that only one my_prod will be always selected and 4 more are competitors of a user's choice.
I need to create another rank (based on another metric) on the fly to make a ranking among selected competitor's items only.
What I managed to do is a rank that hides the value for my_product but counts it to the RANX anyway. I feel like I tried all the solutions with filters etc. but nothing works.
I even found a ticket with the same problem as mine, but the solution was given in the file that is no longer available. Here's the link to the solution.
https://community.fabric.microsoft.com/t5/Desktop/Dax-Exclude-a-row-from-RANKX/m-p/2693735#M942805
I would be super grateful for the help!
Thanks
Natalia
Solved! Go to Solution.
@natti_plis Can you provide a link to a sample file. This seems very doable.
duel_rank =
RANKX(FILTER(ALLSELECTED(smb_pbi_input[Identifier]), [prod_type] = 2), CALCULATE( sum (smb_pbi_input[xxx])), ,ASC)
You're my hero of the day ❤️
It's working perfectly and looks so simple! I've tried doing something similar in many ways, but I had to miss a detail or use the wrong order of functions. After looking the whole day at this report I had reached a dead end.
Thank you so much, and have a great weekend!
Natalia
@natti_plis Can you provide a link to a sample file. This seems very doable.
duel_rank =
RANKX(FILTER(ALLSELECTED(smb_pbi_input[Identifier]), [prod_type] = 2), CALCULATE( sum (smb_pbi_input[xxx])), ,ASC)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |