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 pivot on multiple columns

fabrice_perrin
5 - Atom

I'm trying to do a pivot from a table with multiple columns like this one:

 

Column nameData 1Data 2Data 3Data 4Data 5
Id2514371044
Date15/07/201726/09/201805/04/201605/01/201910/11/2018
Product nameProduct 1Product 2Product 3Product 4Product 5
Price250,1418,35,630050,2
Quantity10243823

 


The desired result is this one:

 

IdDateProduct namePriceQuantity
2515/07/2017Product 1250,1410
1426/09/2018Product 218,324
3705/04/2016Product 35,638
10405/01/2019Product 43002
410/11/2018Product 550,23



The pivot tool works well with a single column. Is there a way to do this with a variable column number?

Thanks in advance.

2 REPLIES 2
CharlieS
17 - Castor
17 - Castor

Use a RecordID to keep things in order while you transform the data. Check out the attached solution and let me know if you have any questions.

 

 

fabrice_perrin
5 - Atom

Perfect, that's exactly what I was looking for.

 

Thank you.

Labels