How do I turn a matrix such as this one:
Customer ID | Product1 | Product2 | Product3 | Product4 |
Product5 1 | 1 | 0 | 3 | 0 | 1 |
2 | 0 | 1 | 2 | 0 | 1 |
3 | 1 | 0 | 0 | 0 | 4 |
into a new transposed one that looks like this:
CustomerID | ProductID | Qty |
1 | Product1 | 1 |
1 | Product2 | 0 |
1 | Product3 | 3 |
1 | Product4 | 0 |
1 | Product5 | 1 |
2 | Product1 | 0 |
2 | Product2 | 1 |
2 | Product3 | 2 |
2 | Product4 | 0 |
2 | Product5 | 1 |
3 | Product1 | 1 |
3 | Product2 | 0 |
3 | Product3 | 0 |
3 | Product4 | 0 |
3 | Product5 | 4 |
Thank you. Apologies if this has been asked before, but my search couldn't bring the results I was looking for.