Forum Discussion
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 member | Datetime | Ranking | Group member | Datetime | Ranking | |||
| X | 2/16/2020 12:26 | 3 | X | 2/16/2020 12:26 | 1 | |||
| Y | 2/16/2020 12:31 | 5 | Y | 2/16/2020 12:31 | 1 | |||
| X | 2/16/2020 12:33 | 2 | X | 2/16/2020 12:33 | 2 | |||
| X | 2/16/2020 12:37 | 1 | X | 2/16/2020 12:37 | 3 | |||
| Y | 2/16/2020 12:38 | 4 | Y | 2/16/2020 12:38 | 2 | |||
| Y | 2/16/2020 12:41 | 3 | Y | 2/16/2020 12:41 | 3 | |||
| Y | 2/27/2020 11:04 | 2 | Y | 2/27/2020 11:04 | 4 | |||
| Y | 2/27/2020 12:14 | 1 | Y | 2/27/2020 12:14 | 5 |
BR Lars
Use the order parameter of RANKX to reverse the ranking order: https://docs.microsoft.com/en-us/dax/rankx-function-dax
2 Replies
- Greg_DecklerCommunity Champion
Use the order parameter of RANKX to reverse the ranking order: https://docs.microsoft.com/en-us/dax/rankx-function-dax
- AnonymousNot applicable
Great! Thank you Greg!