hello,
how can i add ID column based on previous column
input data -
Date |
Settle Date 8/2/2024 |
Settle Date 8/2/2024 |
Settle Date 8/2/2024 |
Settle Date 8/3/2024 |
Settle Date 8/3/2024 |
Settle Date 8/6/2024 |
Settle Date 8/6/2024 |
Settle Date 8/6/2024 |
Settle Date 8/7/2024 |
Expected output -
Date | ID |
Settle Date 8/2/2024 | 1 |
Settle Date 8/2/2024 | 1 |
Settle Date 8/2/2024 | 1 |
Settle Date 8/3/2024 | 2 |
Settle Date 8/3/2024 | 2 |
Settle Date 8/6/2024 | 3 |
Settle Date 8/6/2024 | 3 |
Settle Date 8/6/2024 | 3 |
Settle Date 8/7/2024 | 4 |
Solved! Go to Solution.
Hello @kauser
There are several ways you could tackel this.
I would suggest either a multirow or a tile tool configured as per the images below. If you use the tile tool method. You may also need to use a select tool to rename the relevant column.
I have also attached the corresponding workflow.
Please let me know if you if this helps.
Regards - Pilsner
Hi @kauser
Multi-row formula tool would work:
if [Date] = [Row-1:Date] then [Row-1:ID] else [Row-1:ID]+1 endif
User | Count |
---|---|
60 | |
24 | |
23 | |
21 | |
20 |