Reputation: 13
I have a table named "Colors" in power BI with only one column
Red Green Blue Cyan Grey Etc.
I need to add an index column with DAX that begins from 1 for the first row, 2 for the second row, 3 for the third row,....
I tried to use GENERATESERIES but it results in a table for each cell which is not what i want because i only need 1,2,3,... scalar values that correspond to each row
I also do not want to use power query
I would be grateful if you help
Best Regards
Upvotes: 0
Views: 705
Reputation: 1515
First calculate a measure
Measure = MAX('Table'[Color])
Then calculate Rankx measure
Index = RANKX(ALL('Table'), [Measure])
Upvotes: 0
Reputation: 724
Okay, that's weird. Why not use PowerQuery? That's the ideal way to do it. Please explain your rationale for removing options.
Upvotes: 0