Hi
I have the following dataframe where date columns data type are YYYY-MM-DD
| Id | start_date | end_date |
| 123 | 2023-02-01 | 2023-06-30 |
| 345 | 2023-01-01 | 2023-12-31 |
I'm trying to use Generate Rows Tool to Generate 1st date of the month with conditions
- month should be less than equal to 2023-07-01
- month generated is greater or equal to 2023-03-01
The output that I'm expecting is
| Id | start_date | end_date | month |
| 123 | 2023-02-01 | 2023-06-30 | 2023-03-01 |
| 123 | 2023-02-01 | 2023-06-30 | 2023-04-01 |
| 123 | 2023-02-01 | 2023-06-30 | 2023-05-01 |
| 123 | 2023-02-01 | 2023-06-30 | 2023-06-01 |
| 345 | 2023-01-01 | 2023-12-31 | 2023-03-01 |
| 345 | 2023-01-01 | 2023-12-31 | 2023-04-01 |
| 345 | 2023-01-01 | 2023-12-31 | 2023-05-01 |
| 345 | 2023-01-01 | 2023-12-31 | 2023-06-01 |
| 345 | 2023-01-01 | 2023-12-31 | 2023-07-01 |
The current solution that we have is using Condition Expression month <= end_date with Loop Expression DateTimeAdd(month,1, 'month') then use Filter Tool to ignore the rows that we do not want, just wondering we can eliminate Filter Tool step to make the workflow more neater
Best Regards,