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.
SOLVED

Transpose first 5 rows of data into columns

Mwoody_05
7 - Meteor

Hi All,

 

I've seen this solved when it's only 2 rows, but I can't figure out how when there's more. I have data coming in in the following format.

Mwoody_05_0-1647971690875.png

And I need to transform it to the following format.

Mwoody_05_1-1647971767171.png

 

Thank you in advance!!

 

4 REPLIES 4
Kamran1991
11 - Bolide

Hi @Mwoody_05 

 

Please find the attached workflow, hopefully it will answer your query.

 

Thanks!

 

Kamran

StephaneP
Alteryx Alumni (Retired)

Hello @Mwoody_05 ,

 

Here a generic way of doing the process.

StephaneP_0-1647977364359.png

What ever is the number of header it will always work the same way. The idea is to separate header and data. Transpose the header and then, based on an ID, reconcile it with the data. Then it is generic.
What you have to do from 1 case to another is just adapt the numbers of row/ column you have in the header (and then in the foloowing process). Same thing from data.
The little trick is at the very import 1st step to check the "1st row contain data" that will then generate a sort of unique ID for the column (F1, F2, F3...) which prevent you from any error if your 1st header have duplicate labels.

Hope it helps

Stéphane Portier
Sales Engineer
Alteryx
Mwoody_05
7 - Meteor

This is Awesome, Thank you so much!

Mwoody_05
7 - Meteor

I think this would have worked, however I have 96 metrics in my data so it would take a lot of appends. Appreciate you taking the time though. Very helpful!

Labels