Alteryx Designer Desktop Discussions

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

Convert Multiple rows to Columns

hay_001
7 - Meteor

I'm working on time-series data and want to convert multiple rows to column. I have tried using transpose and crosstab, but seem to me i'm doing something wrong. See below for sample record.

 

hay_001_0-1657733813805.png

 

 

See output record below

 

hay_001_1-1657733856801.png

 

6 REPLIES 6
Luke_C
17 - Castor

Can you attach the data instead of screenshots? Typically you'll want to use a sample tool to isolate the top 4 rows, transpose those, and join them back to your dataset.

Aguisande
15 - Aurora
15 - Aurora

Hi @hay_001 

To accomplish what you're trying to do, you must apply two different treatments to your input file.

First 4 rows need different operations than the remaining ones.

I'd split the file (maybe using a RecordID and filtering the first four rows and the remaining ones).

Then start transposing & CrossTabing.

At the end, merge the two datastreams to get the desired output.

hay_001
7 - Meteor

See attached

Luke_C
17 - Castor

Hi @hay_001 

 

As mentioned above, isolate the headers and then join back to the data. The top piece gets the 5 header rows and flips them to be columns. Then it joins back to the dates and values.

 

Luke_C_0-1657737251445.png

 

 

Emmanuel_G
13 - Pulsar

Hi @hay_001 ,

 

Find a solution attached.

 

Emmanuel_G_0-1657739290350.png

 

 

hay_001
7 - Meteor

@Luke_C, Awesome and thank you, that worked..

Labels