Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Dynamically transform data from long to wide format

overhead_press
8 - Asteroid

I have a sample of my data below and I am wondering how could I transform my data from long to wide based on the groupings in the 'Class' column? Note there will be plenty of different 'Class' types and varying rows just like the example below, thanks! 

 

Example data:

ClassDescAmount
ATest1
ATest22
ATest33
BTest24
BTest45
CTest26

 

Desired output:

ClassDescAmountClass2Desc2Amount2Class3Desc3Amount2
ATest1BTest24CTest26
ATest22BTest45   
ATest33      
2 REPLIES 2
CathyS_Slalom
9 - Comet

Hi @overhead_press, please find attached work around example. You can use the dynamic rename tool to rename the column to the way you desired. 

CathyS_Slalom_0-1656108140099.png

 

Adrian_T
Alteryx
Alteryx

Hi @overhead_press,

 

@CathyS_Slalom's solution should work perfectly for you. Just thought to share that the key here is the Cross-Tab tool which allows you to transform data from rows to columns. Here is an extremely useful resource which will get you up to speed on how this tool works! 🙂

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-Cross-Tab/ta-p/4368

 

Labels