Alteryx Designer Desktop Discussions

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

Data Transpose

hemant86
11 - Bolide

Hi Team I have data in the below format and need output in the give format below. Appreciate any help around this.

 

Input Data:

EMP IDFile#PaygroupGross AmountLoc CodeRehire DateTermination Date
34621261W3K060896/20/20163/15/2023
346253906PAV4963.1113206/20/20163/15/2023
346318683WXB1117.2213206/20/20163/15/2023
8142180TZL222,112.19VNM2/20/2012 
8141037JHZ144789VCA2/20/2012 

 

Output Data:

Employee ID

Paygroup 1

Gross amount 1

Loc 1

Paygroup 2

Gross amount 2

Loc 2

Paygroup 3

Gross amount 3

Loc 3

346

W3K

0

6089

PAV

4963.11

1320

WXB

1117.22

1320

814

TZL

222,112.19

VNM

JHZ

144789

 

 

 

 

 

The Employee ID header is fixed but the tool should be able to create maximum number of columns dynamically. Like in this input we 3 entries for one employee and 2 entries for the other so the tool would create Paygroup1 , Paygroup2 , Paygroup3 . Similarly Gross amount 1 , Gross amount 2 , Gross amount 3 & Loc 1 , Loc 2 , Loc 3. The columns File# & Termination Date can be ignored.

 

Thanks in advance!

3 REPLIES 3
cjaneczko
13 - Pulsar

Here is one way to do it.

 

image.pngimage.png

hemant86
11 - Bolide

Thanks @cjaneczko . This works great. I learned something new. 😊

cjaneczko
13 - Pulsar

Great. If the number of columns became larger you could add a Field Info tool to the workflow as well as a Dynamic Rename to dynamically set the field order. Right now, if more fields get added you need to rearrange it with the Multi-Join tool. 

Labels