Hi community, Can you please help with formating from before to after, base on the same person and sum days, group by if they are in consecutive days, note that the Days column is always 1.
Please see the following, hope this make sense, thank you
BEFORE:
Name | From | Days | To |
A | 2025-10-06 | 1 | 2025-10-07 |
A | 2025-10-07 | 1 | 2025-10-08 |
A | 2025-10-15 | 1 | 2025-10-16 |
A | 2025-10-16 | 1 | 2025-10-17 |
B | 2025-06-16 | 1 | 2025-06-17 |
B | 2025-06-17 | 1 | 2025-06-18 |
B | 2025-10-14 | 1 | 2025-10-15 |
B | 2025-10-15 | 1 | 2025-10-16 |
B | 2025-11-10 | 1 | 2025-11-11 |
AFTER:
Name | From | Days | To |
A | 2025-10-06 | 3 | 2025-10-09 |
A | 2025-10-15 | 2 | 2025-10-17 |
B | 2025-06-16 | 2 | 2025-06-18 |
B | 2025-10-14 | 2 | 2025-10-16 |
B | 2025-11-10 | 1 | 2025-11-11 |
Solved! Go to Solution.
@Ryanz3653 One way of doing this
Thanks for answer, I see how you group by, but what if there are data from 2025-03-31 to 2025-04-01? which are still consective days and should be group by the same. So the logic is, the same person and also consective days should be group by together
Thanks for your help
it's the same workflow. What if i changed it to:
B 2025-12-31 1 2026-01-01
B 2026-01-01 1 2026-01-02
and it won't work,
it should be B 2025-12-31 2 2026-01-02
the idea is group the same person and count the consective days
I hope you get what i mean, thanks
@Ryanz3653 let me know the attached workflow works for you