Hi, I have a monthly average calculated based on a start and end date, and I'm trying to organize them into columns by month and year according to the duration between the start and end dates. Any assistance would be greatly appreciated! Thank you!
Input Data:
Product | Total$ | Avg$ | Start Date | End Date | Duration |
A | 144 | 12 | 3/1/2024 | 3/1/2025 | 12 |
B | 96 | 8 | 2/1/2024 | 2/1/2025 | 12 |
Desired Output:
Product | Total$ | Avg$ | Start Date | End Date | Duration | 2024-01 | 2024-02 | 2024-03 | 2024-04 | 2024-05 | 2024-06 | 2024-07 | 2024-08 | 2024-09 | 2024-10 | 2024-11 | 2024-12 | 2025-01 | 2025-02 | 2025-03 |
A | 144 | 12 | 3/1/2024 | 3/1/2025 | 12 | 12 | 12 | 12 | 12 | 12 | 12 | 12 | 12 | 12 | 12 | 12 | 12 | |||
B | 96 | 8 | 2/1/2024 | 2/1/2025 | 12 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 8 |
Generate Rows is your best bet to create the rows between your Start Date and End Date - then you can reformat the result into your YYMM format using a Formula, and Crosstab that column to be your new headers!
since there is no Jan 2024 data in your start/end date, if you want that column you'll have to figure out another way to get it - you can figure out a way to create that as a row so it automatically goes into the crosstab