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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.