Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
MPetramalo214
Helper I
Helper I

RANKX Assigning Different Ranks to Same Value

Hi all,

 

Hoping that someone can help clarify how the RANKX function should be working, and whether my results would be the expected results.

 

I'm currently ranking all store locations by their % to staffing.  I take this by using the absolute value of the variance from Headcount to HC Goal.  (ie.  24 / 22 and 20 / 22 would both produce 9.09%). 

 

We're getting the expected values in most results; but some rankings are showing not what I would expect.

MPetramalo214_0-1660155595026.png

 

In the screenshot above, Rank 10 and 11 share a value, but RANKX is prioritizing the Lower HC (25 / 27 vs 29 / 27).

 

But at the same time, Rank 12 and Rank 14 all share 9.09% but the locations above their staffing goal are set in 12, and then the locations under Rank 14 are below their staffing goal but ranked lower than the other 2. 

 

Ideally all the values that are the same would be ranked the same; but if that isn't the functionality of RANKX, than I'd want it to be consistent.  Either always rank the locations under staff goal higher than the locations over staff goal.

1 REPLY 1
lbendlin
Super User
Super User

please show your DAX

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.