Forum Discussion
Anonymous
5 years agoNot applicable
Index column based on duplicates
Hi,
I'd like to create an index column following the example below :
| ID | DATE | INDEX |
| A | 2021-01-14 | 1 |
B | 2021-01-15 | 2 |
| C | 2021-01-15 | 2 |
| D | 2021-01-15 | 2 |
| E | 2021-01-16 | 3 |
| F | 2021-01-16 | 3 |
If the date is the same than the previous row, keep the same index.
If the date is different of the previous one, increment index.
Does someone knows how to do that with Power Query ?
Thanks in advance
Best regards,
Cado
Make a table that just includes the date column .
Remove Duplicates.
Add Index Column.
---
Merge the 2 tables based on the date (returning the index column to the original table).
--
Let me know how it goes
2 Replies
- HotChilliCommunity Champion
Make a table that just includes the date column .
Remove Duplicates.
Add Index Column.
---
Merge the 2 tables based on the date (returning the index column to the original table).
--
Let me know how it goes
- AnonymousNot applicable