Alteryx Designer Desktop Discussions

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

Column Values to Headers

saachitalwar
7 - Meteor

I have a table in the form:

 

daterate
 type1 type2 
date1Aval1Aval9
[Null]Bval2Bval10
date2Aval3Aval11
[Null]Bval4Bval12
date3Aval5Aval13
[Null]Bval6Bval14
date4Aval7Aval15
[Null]Bval8Bval16

 

and I wish to transform it into:

 

 type1 type2 
datesABAB
date1val1val2val9val10
date2val3val4val11val12
date3val5val6val13val14
date4val7val8val15val16

 

I tried cross tab but the 4 values need to be aggregated, I just want the values as they are in a column.

Thanks!

3 REPLIES 3
aatalai
13 - Pulsar

@saachitalwar you need to start by changing the Strucure. 

I would start by using the multi row tool to give each row a date with if row:date != null() then row:date else row-1:date endif

 

then restruter the data selecting the date and the type 1 columns and then use another selct tool, selecting date and the type 2 columns

 

REname the the type names to A1,B1 and A2,B2 using the forumla tool.

 

Then stack them together using the union tool

 

Then cross tab it setting get column names from what the A1,B1,A2,B2 field is called and get values from the values field and group by date.

 

Let me know how you get on

saachitalwar
7 - Meteor

Can you please show this on an alteryx file

DavidSkaife
13 - Pulsar

Hi @saachitalwar 

 

Here is one attempt at it:

 

Capture.PNG

Labels