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
TRK
Helper II
Helper II

DAX measure to rank values that returned in a measure (not a calculated column)

Hi,

 

I have a measure that is multiplying values of 3 measues (each are each sum of items in that are in 3 different tables):

Age is in "Tombstone table"
Last odometer reading is in "Trip table"

Operating repair costs is in "Expenses table"

 

Surplus Weighted Value = [Age]*0.3 + [Latest Odometer Reading ]*0.3 + [Operating Repair Costs]*0.4

This returns a value in a table:

ranking image.png

 



 
 
I want to create a measure that would create a rank list of 1 to xx from the highest value. that would change as I applied other filters on the page.



I have tried a few options but every row returns a '1'.  Is it possible to do this  - what would the DAX look like?

thanks!
1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @TRK ,

Since you did not provide a specific data template, you can refer to my model. The following atestmeasure is a measure, filtered according to slicer, rank is sorted according to atestmeasure, return value unchecked data.

vluwangmsft_0-1650354655828.pngvluwangmsft_1-1650354662903.png

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @TRK ,

Since you did not provide a specific data template, you can refer to my model. The following atestmeasure is a measure, filtered according to slicer, rank is sorted according to atestmeasure, return value unchecked data.

vluwangmsft_0-1650354655828.pngvluwangmsft_1-1650354662903.png

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

PaulDBrown
Community Champion
Community Champion

Something along the lines of:

RANK = RANKX(ALLSELECTED (Table), [Surplus Weighted Values])





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






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.