Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

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!

  • Anonymous's avatar
    Anonymous
    7 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

  • Anonymous's avatar
    Anonymous
    Not 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
    • Anonymous's avatar
      Anonymous
      Not applicable

      Anonymous Thank you!

    • adamarrafy's avatar
      adamarrafy
      New Member
      In my case, I'm using a calculated table, but the issue is that calculated tables don't show up in Power Query