Hi,
I have a dataset as you can see in below:
WEEK | App ID | Total |
---|---|---|
1 | 123 | 5 |
1 | 123 | 6 |
1 | 123 | 7 |
1 | 456 | 3 |
1 | 456 | 3 |
1 | 456 | 2 |
2 | 123 | 1 |
2 | 123 | 5 |
2 | 123 | 6 |
2 | 456 | 2 |
2 | 456 | 4 |
2 | 456 | 3 |
I want to add Date column by groups (grouping by Week and App ID).
WEEK | App ID | Total | Date |
---|---|---|---|
1 | 123 | 5 | 2020-12-28 |
1 | 123 | 6 | 2020-12-29 |
1 | 123 | 7 | 2020-12-30 |
1 | 456 | 3 | 2020-12-28 |
1 | 456 | 3 | 2020-12-29 |
1 | 456 | 2 | 2020-12-30 |
2 | 123 | 1 | 2020-12-31 |
2 | 123 | 5 | 2021-01-01 |
2 | 123 | 6 | 2021-01-02 |
2 | 456 | 2 | 2020-12-31 |
2 | 456 | 4 | 2021-01-01 |
2 | 456 | 3 | 2021-01-02 |
In original dataset, I have 7 days for each App but it depends. So, I don't want to populate manually multiplying with 7. I want to automatize grouping by Week and App ID.
Thank you.