Forum Discussion
clim2f88j
2 years agoFrequent Visitor
Index Column Based on ID and Date
Hello everyone, I need to add an index column based on consumers ID and date. Data: ID Date AAA 1/1/23 AAA 3/7/23 AAA 4/18/23 BBB 12/19/22 BBB 4/5/23 CCC 7/9/23 ...
Anand24
Super User
2 years agoHi clim2f88j ,
Create a calculated measure with below DAX:
Index =
RANKX (
ALLEXCEPT('Table', 'Table'[ID]),
CALCULATE ( MAX ( 'Table'[Date] ) ),
,
ASC,
DENSE
) - 1
Here's the result:
Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!! Proud To Be a Super User !!! |
Sammyben
2 years agoNew Member
I have same question but I need to create by id then category and then by date. Hiw can I add also the category?