Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
Solved! Go to Solution.
Use the order parameter of RANKX to reverse the ranking order: https://docs.microsoft.com/en-us/dax/rankx-function-dax
Use the order parameter of RANKX to reverse the ranking order: https://docs.microsoft.com/en-us/dax/rankx-function-dax
Great! Thank you Greg!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 9 | |
| 7 | |
| 6 |