In Power BI's Power Query, let say I have the below table.
| Customer | Product 1: Type | Product 1: Cost | Product 2: Type | Product 2: Cost |
|---|---|---|---|---|
| Cust 1 | A | $5 | B | $15 |
| Cust 2 | A | $5 | C | $20 |
The goal is to unpivot so that there is no product 1 or product 2, just product, effectively taking the 4 columns in to 2
| Customer | Product Type | Product Cost |
|---|---|---|
| Cust 1 | A | $5 |
| Cust 1 | B | $15 |
| Cust 2 | A | $5 |
| Cust 2 | C | $20 |
I know this is fairly simple if just unpivoting from many columns to 1 column through the Unpivot columns function. But how do you go about unpivoting many columns into n columns without doing this n times and rejoining?



Cust 1 B $1correct?