Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
There is a function in Power Query of adding Index Column.
Index Column numbered the rows starting from 1 or 0 without repeating numbers.
I need the same function but in table view.
I add a new table using summarize, so there is no Power Query for this table.
Is there any dax function having same effect?
Solved! Go to Solution.
pls try this
Table 2 = ADDCOLUMNS('Table',"Index",RANKX(all('Table'[Item]),'Table'[Item],,ASC))
Proud to be a Super User!
maybe you can try to use rankx to create the index column
Table 2 =
VAR tbl=SUMMARIZE('Table','Table'[id],"amount",sum('Table'[value]))
return ADDCOLUMNS(tbl,"Index",rankx(all('Table'[id]),'Table'[id],,ASC))
Proud to be a Super User!
Hi Ryan,
Thank for your reply.
I have tried rankx too.
However, I have plenty item with same amount in my case.
I don't want same number coming up.
Here's the example.
Item | amount | rankx | what I want |
a | 2 | 1 | 1 |
b | 2 | 1 | 2 |
c | 4 | 3 | 3 |
d | 5 | 4 | 4 |
e | 5 | 4 | 5 |
pls try this
Table 2 = ADDCOLUMNS('Table',"Index",RANKX(all('Table'[Item]),'Table'[Item],,ASC))
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
30 | |
26 |
User | Count |
---|---|
99 | |
87 | |
45 | |
43 | |
35 |