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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Anonymous
Not applicable

RANKX

Hi,

 

I'm using the following formula to perform a ranking:

 

 =RANKX(FILTER('DM FKT_POWERAPP_KPIBYGG_STRATEGIKART','DM FKT_POWERAPP_KPIBYGG_STRATEGIKART'[ORG.CONCAT] = EARLIER('DM FKT_POWERAPP_KPIBYGG_STRATEGIKART'[ORG.CONCAT])),'DM FKT_POWERAPP_KPIBYGG_STRATEGIKART'[REGISTRERT_DATO])

 

The logic behind it is that as a new row gets inserted (Analysis Services, Visual Studio) in the table, the group member associated with that row will get assigned a new sequantial numeric value in descending order. The newest row should have the highest ranking for that particular group member. The current formula gives the newst row the lowest value. How do I account for that?

 

 

Current    What I want 
         
Group memberDatetimeRanking   Group memberDatetimeRanking
         
X2/16/2020 12:263   X2/16/2020 12:261
Y2/16/2020 12:315   Y2/16/2020 12:311
X2/16/2020 12:332   X2/16/2020 12:332
X2/16/2020 12:371   X2/16/2020 12:373
Y2/16/2020 12:384   Y2/16/2020 12:382
Y2/16/2020 12:413   Y2/16/2020 12:413
Y2/27/2020 11:042   Y2/27/2020 11:044
Y2/27/2020 12:141   Y2/27/2020 12:145

 

 

BR Lars

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

Use the order parameter of RANKX to reverse the ranking order: https://docs.microsoft.com/en-us/dax/rankx-function-dax



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

Use the order parameter of RANKX to reverse the ranking order: https://docs.microsoft.com/en-us/dax/rankx-function-dax



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Great! Thank you Greg!

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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