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
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


@ 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!:
The Definitive Guide to Power Query (M)

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


@ 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!:
The Definitive Guide to Power Query (M)

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

Great! Thank you Greg!

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.

Top Solution Authors
Top Kudoed Authors