Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Creating New Rows of Data Based on Single Row

scsh4
7 - Meteor

Hey, Alteryx Community Members!

 

I'm having a tough time imagining how to accomplish this task. Very basically, I have a single row of data for each sales order, with multiple columns representing dollar values for different sectors, including a start date, and a duration (in months). I'm attempting to take this data and transform it from one row to multiple rows, accounting for the duration, and adding a date value based on the start date and duration.

 

It is easiest for me to show my "input" and "expected output" by attaching a workflow with the raw data. I have attempted a few different iterations by creating a new column, assigning a record and a value ID, and joining them back together, but I'm clearly missing something. Any help is greatly appreciated!

 

I should mention that despite the data, the output should always be the first day of the given month.

2 REPLIES 2
Luke_C
17 - Castor
17 - Castor

Hi @scsh4 

 

You can leverage the generate rows tool for this. I've attached an example using your data. We can use a combination of the start date and duration to dynamically generate rows for each record. Then we can transpose this data to get the revenue types as rows.  Let me know if this helps

 

lukecornetta_0-1615494192456.png

 

Maskell_Rascal
13 - Pulsar

@Luke_C 

 

I had a similar approach, but I like your method of creating the dates using the Generate Rows tool! 😀

 

Maskell_Rascal_0-1615494748741.png

 

Labels