Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
How do I get RANKX to work on filtered data source where same product appears on multiple rows?
In this Excel example, the data loads easily into a pivot table for the desired result.
As you can see, Banana ranked #2 in the WEST, but #3 in the EAST.
What am I missing in my RANKX calculated measure?
I want to be able to filter on different Time Period, different Geography, different Brands and rank to change based on slicer/filtering. Thanks.
Solved! Go to Solution.
Hi FreemanZ
That helped, but the rank result is not correct when filtered or unfiltered.
Hello @tarmerj1
THANK YOU! Both of your options work, but option 1 is my desired result.
I am going to use:
$ RANK = RANKX(ALLSELECTED(ItemRANK), CALCULATE(SUM(ItemRANK[Dol$ Sales])), ,DESC)
The fix was to remove [Product] from ALLSELECTED. Thanks @tarmerj1 and @FreemanZ, much appreciated.
hi @Kirk_1
try like:
$ RANK = RANKX(ALLSELECTED(ItemRANK[Product]), CALCULATE(SUM(ItemRANK[Dol$ Sales])), ,DESC)
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |