Reputation: 63
I have a table which contains 2000 entries. I want to add an index column to the table which will "reset" for each unique entrie in another column.
Hopefully the below table will help explain it
Team Name | Library Name | Index |
---|---|---|
Team 1 | January | 1 |
Team 1 | January | 2 |
Team 1 | January | 3 |
Team 1 | February | 1 |
Team 1 | February | 2 |
Team 1 | February | 3 |
Team 1 | March | 1 |
Team 1 | March | 2 |
Team 1 | March | 3 |
Team 1 | March | 4 |
Team 1 | April | 1 |
Team 1 | April | 2 |
Team 1 | April | 3 |
Team 1 | April | 4 |
Team 1 | April | 5 |
I just can't get my head around how to achieve this. Any ideas would be appreciated.
Upvotes: 1
Views: 941
Reputation: 30219
Start table:
Group by:
Add new column:
Expand and remove old columns:
Upvotes: 3