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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
gluizqueiroz
Resolver I
Resolver I

Problem with simple rankx

SalesPersonSalesMeasure Rankx
Jonh1001
Mary802
Tom803
Eli704
Clark505
Anne406


I wanna make a simple RANKX but I'm having some problems, my RANKX is the following:

Measure RANKX = RANKX(ALLSELECTED(BI_Sales[SalesPerson]); [Sum_Sales]))
Sum_Sales = SUM(BI_Sales[Sales])

I have done a simple RANK like this in other projects and it works. 
Someone knows what can cause it?

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

If you are wondering why the rank is the same, it is probably because there are decimal numbers in the sales figures.  Check your source data.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

If you are wondering why the rank is the same, it is probably because there are decimal numbers in the sales figures.  Check your source data.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

Not Sure , I for the issue completely. Given all or table name instead of  all selected

 

Measure RANKX = RANKX(ALL(BI_Sales[SalesPerson]); [Sum_Sales]))
Measure RANKX = RANKX((BI_Sales); [Sum_Sales]))

 

Refer for rank

 

https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
TCarrasquillo
Helper II
Helper II

I'm not sure what problem you are having. Did you want the ranking to be tied between the 2 that have the same sales?  I'm pretty sure that you can specify the ties portion of a rankx measure with Dense or Skip

so the measure would look like..... Rankx(all selected(table); [measure],,dense))

 

I'm pretty sure that dense is the one that would give you 2 Rank 2's but I'd try both options and see what's better

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.