Hi there,
I am trying to create a time series which shows transactions for two different product categories.
Each category (Category A and Category B) needs to have transactions for each day of the year. Something like this:
| Date | Category |
|---|---|
| 01/01/2020 | A |
| 01/01/2020 | B |
| 02/01/2020 | A |
| 02/01/2020 | B |
| 03/01/2020 | A |
| 03/01/2020 | B |
| 04/01/2020 | A |
| 04/01/2020 | B |
| … | … |
I have read in the forum how to create consecutive dates using ‘row number’:
date(‘12/31/2020’) + days(this)
The issue is that it brings the date sequentially, but each day will only appear once, and with a random category assigned. Something like this:
| date | category |
|---|---|
| 2022-01-01 | B |
| 2022-01-02 | B |
| 2022-01-03 | A |
| 2022-01-04 | A |
Is there any way to achieve this?
Thanks a lot in advance!