Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Dynamically inseart new columns from new Data

backrocket
7 - Meteor

Hey!

 

I am trying to dynamically create new columns based on user input. I have one excel sheet which has all the column names I will need to have. The ACTIVITY DESCRIPTION will be the new column Names, and the ACTIVITY TYPE will be the value.

 

1.PNG

 

My Input one is the data I want to add these columns to.

 

2.PNG

 

My final Output looks like this.

 

3.PNG

 

The key thing to mention here is that the data joins at different rows. I have tried using Crosstab on input 2 to make it into columns. But i cannot figure out how to join the data at different rows. Any help would be much appreciated. Attached it is the excel file.

 

 

1 REPLY 1
danilang
19 - Altair
19 - Altair

Hi @backrocket 

 

Here's a workflow that does what you're looking for.  It uses 2 transposes to build the 2 header rows.  It joins the 2nd header row to the main data and unions all the resulting rows.  The trick I used here is to start the recordID for the main data at 2 so that it would match up with the second header row.

 

WF.pngResults.png

 

Dan

Labels