cancel
Showing results for 
Search instead for 
Did you mean: 
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
Super User
Super User

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
Winner of T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Find out who won the T-Shirt Design Challenge and the top 3 finalists.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.