Forum Discussion
Anonymous
7 years agoNot applicable
Index Column By Category
Hey, I Searched for a solution all over the forum, there are some similar but i did not figure out how to do it correctly.
What I'm trying to do is to add an index column, which tells me the row number for the CustIt. I've already sorted the data by date (Descending), and now i'm trying to add the column.
I've marked in red what i meant.
Thanks for your help!
- Anonymous7 years ago
- Groupby CustID using All Rows in the Operation
- Add a custom column with:
Table.AddIndexColumn([Whatever You Named the Column in the Prev Step], "Index", 1, 1)
- Remove all the other columns except the one just created
- Expand out
- Remove any misc columns you dont need and set data types
4 Replies
- AnonymousNot applicable
- Groupby CustID using All Rows in the Operation
- Add a custom column with:
Table.AddIndexColumn([Whatever You Named the Column in the Prev Step], "Index", 1, 1)
- Remove all the other columns except the one just created
- Expand out
- Remove any misc columns you dont need and set data types
- AnonymousNot applicable
Anonymous Thank you!
- adamarrafyNew MemberIn my case, I'm using a calculated table, but the issue is that calculated tables don't show up in Power Query
- StachuCommunity Champion
this article gives an example how to do it:
https://www.excelguru.ca/blog/2018/06/27/number-rows-by-group-using-power-query/