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:
Class | Desc | Amount |
A | Test | 1 |
A | Test2 | 2 |
A | Test3 | 3 |
B | Test2 | 4 |
B | Test4 | 5 |
C | Test2 | 6 |
Desired output:
Class | Desc | Amount | Class2 | Desc2 | Amount2 | Class3 | Desc3 | Amount2 |
A | Test | 1 | B | Test2 | 4 | C | Test2 | 6 |
A | Test2 | 2 | B | Test4 | 5 | |||
A | Test3 | 3 |
Solved! Go to Solution.
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.
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