I'm trying to do a pivot from a table with multiple columns like this one:
Column name | Data 1 | Data 2 | Data 3 | Data 4 | Data 5 |
Id | 25 | 14 | 37 | 104 | 4 |
Date | 15/07/2017 | 26/09/2018 | 05/04/2016 | 05/01/2019 | 10/11/2018 |
Product name | Product 1 | Product 2 | Product 3 | Product 4 | Product 5 |
Price | 250,14 | 18,3 | 5,6 | 300 | 50,2 |
Quantity | 10 | 24 | 38 | 2 | 3 |
The desired result is this one:
Id | Date | Product name | Price | Quantity |
25 | 15/07/2017 | Product 1 | 250,14 | 10 |
14 | 26/09/2018 | Product 2 | 18,3 | 24 |
37 | 05/04/2016 | Product 3 | 5,6 | 38 |
104 | 05/01/2019 | Product 4 | 300 | 2 |
4 | 10/11/2018 | Product 5 | 50,2 | 3 |
The pivot tool works well with a single column. Is there a way to do this with a variable column number?
Thanks in advance.
Solved! Go to Solution.
Perfect, that's exactly what I was looking for.
Thank you.