Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a table that looks like this
| ID | Name | Date |
| 1 | Johnson | 12/03/2021 |
| 1 | Johnson | 01/05/2022 |
| 2 | Davis | 04/15/2021 |
| 2 | Davis | 08/12/2021 |
| 3 | Williams | 12/14/2021 |
I would like to create a table that looks like this
| ID | Name | Date | Rank Order |
| 1 | Johnson | 12/03/2021 | 1 |
| 1 | Johnson | 01/05/2022 | 2 |
| 2 | Davis | 04/15/2021 | 1 |
| 2 | Davis | 08/12/2021 | 2 |
| 3 | Williams | 12/14/2021 | 1 |
Currently I have this formula. This gives me the wrong answer cause it ranks by date, but I know i'm close. I tried to set a group by as a second variable but i didn't know how to add it in the arguments or Rank. I'm trying to do it within the context of the variable chain.
Final Table =
Var Table=
DISTINCT(SELECTCOLUMNS('OriginalTable',"ID",'Orginal'[ID],"Name",'OriginalTable'[Name],"Date",'OriginalTable'[Date]))
var Table2 =
ADDCOLUMNS(Table,"Rank Order", RANKX(OriginalTable,[Date],,ASC,Dense))
return Table2
.
Solved! Go to Solution.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.