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
Hey friends,
I've been trying to use RANKX for a few days now to better filter my visuals, but have finally broken and come here asking for help.
I have this table:
And I'm trying to use a RankX Measure to rank VendorName based on the following Measure:
Which, as you can see, works great :
Yet when I add the Field name to the same visual table, the Vendor ranks go whacky, with multiple different vendors having the same "Rank"
Each vendor has the same set number of "Field Name"s. My end goal is to use the Vendor Rank and Field Name to display in 3 different bar graphs the top "Changed in VA" Field Names, of the top 3 Vendors (One graph per vendor). An easy solution would be to just create a calculated column, but unfortunately, I can't use that approach as I have slicers on the page which need to interact with the visuals I'm creating., and from my experience slicers don't work on column values.
Thanks for your help!
@StevenTeglman , Rank measure is pretty sensitive to row context. So the addition of field name to the table means all vendor inside the field name
example
City Rank = RANKX(all(Geography[City]),[Sales]) // this does not work with city id, all ranks are 1
City and ID Rank = RANKX(all(Geography[City],Geography[City Id]),[Sales]) // work with city id
Geography Rank = RANKX(all(Geography),[Sales])// work with city id lowest level in table
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...
Hi @amitchandak
Thank you for your response. I tried to implement what you said, yet I'm not sure it worked the way it's supposed to.
I wasn't expecting to need more than 18 gigs of ram to run DAX Measures 😅
The EX table has 1.5 million rows, but I still don't think that should happen?
Anyways, I think I'm just going to settle for using a static rank for my Vendors, instead of a measure. It's not exactly what I want, but it'll have to do.
You might consider providing your dummy pbix that would be helpful for us to investigate it further.
You can upload it to the onedrive for business and share the link here. please don't forget to disclose the expected results and remove the confidential info.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |