Hi,
I have the following table within my output
Cust_No Start_Date End_Date Comp_Val Monthly_Val
123 2021-03-18 2022-03-17 1100 91.66
As you can see, the months between start_date and end_date for this example, is 12 months.
What I would like to see is a row for each Year_Month between Start_Date and End_Date with a new variable added
Example
Cust_No Start_Date End_Date Comp_Val Monthly_Val Year_Month
123 2021-03-18 2022-03-17 1100 91.66 2021-03
123 2021-03-18 2022-03-17 1100 91.66 2021-04
123 2021-03-18 2022-03-17 1100 91.66 2021-05
123 2021-03-18 2022-03-17 1100 91.66 2021-06
123 2021-03-18 2022-03-17 1100 91.66 2021-07
123 2021-03-18 2022-03-17 1100 91.66 2021-08
123 2021-03-18 2022-03-17 1100 91.66 2021-09
123 2021-03-18 2022-03-17 1100 91.66 2021-10
123 2021-03-18 2022-03-17 1100 91.66 2021-11
123 2021-03-18 2022-03-17 1100 91.66 2021-12
123 2021-03-18 2022-03-17 1100 91.66 2022-01
123 2021-03-18 2022-03-17 1100 91.66 2022-02
123 2021-03-18 2022-03-17 1100 91.66 2022-03
Any idea how this could be done please?