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
Lopez0090
Helper III
Helper III

How to use rank functions that are not ranked by category

I want to create a measure that is not ranked by category.

In the current measure, it is ranked like "Rank", but I want to rank it like "Rank I want".

i want.png

 

▼Formula of the created measure

Total = SUM('Table 1'[Value])
Rank = RANKX(ALL('Table 1'[ID]),[Total],,,Dense)

 

▼Here are the data used and the actual visuals.

now rank.pngdata.png

 

Thank you in advance.

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Lopez0090 , Try like

Rank = RANKX(ALL('Table 1'[ID], 'Table 1'[Category]),[Total],,,Dense)

 

For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures

View solution in original post

2 REPLIES 2
v-xiaotang
Community Support
Community Support

Hi @Lopez0090 

Does the result you want?

v-xiaotang_0-1622536228121.png

If yes, use the two measures:

Total = SUM('Table'[Value])
Rank = RANKX(ALL('Table'),[Total],,,Dense)

See sample file attached bellow.

 

 

Best Regards,

Community Support Team _ Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Lopez0090 , Try like

Rank = RANKX(ALL('Table 1'[ID], 'Table 1'[Category]),[Total],,,Dense)

 

For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures

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.