Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

How to display monthly average from start/end date into YYMM columns in sequence

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:

ProductTotal$Avg$Start DateEnd DateDuration
A144123/1/20243/1/202512
B9682/1/20242/1/202512

 

Desired Output:

ProductTotal$Avg$Start DateEnd DateDuration2024-012024-022024-032024-042024-052024-062024-072024-082024-092024-102024-112024-122025-012025-022025-03
A144123/1/20243/1/202512  121212121212121212121212 
B9682/1/20242/1/202512 888888888888  
1 REPLY 1
alexnajm
18 - Pollux
18 - Pollux

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

Labels
Top Solution Authors