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

How to transform this table?

sparksun
11 - Bolide

Just now I saw a question regarding table transformation in an Excel user forum,It's just a sample,actually there are five different stages and hundreds of fields (A,B,C...X,Y,Z...) in the table,I wonder if it is possible to transform the table automatically in Alteryx.

v2-23faf4751318a58fc48646491ed441a3_r.png

 

2 REPLIES 2
aatalai
14 - Magnetar

@sparksun not an exact 1-2-1 replica of what you want but a good starting point

gawa
16 - Nebula
16 - Nebula

hi @sparksun 

Solution by @aatalai perfectly meets your demand, but let me ask some question.

If you have hundreds of fields, A,B,C...X,Y,Z...as you wrote, output table will look like this. Table will be long in horizontal direction.

image.png

 

Instead, as another approach, you can use "Stage" as a header of output table, that would look like this. Table will be long in vertical direction.

image.png

The advantage of this style is that you always have the same number of column(=static schema), while in the previous style number of column is dynamic depending on  A,B,C...X,Y,Z..(=dynamic schema)

 

For your reference, I prepared my WF to simulate the above two patterns so please see which looks/fits better to your task.

*Please note that the above statements is based on my assumption that "stage" always has static value like"stage1" and "stage2".

 

image.png

Labels