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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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