This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
My input data has Years and month date as a column header. Can I transpose it into rows?
To illustrate my data has the following form:
| Customer | Product | 2018.01 | 2018.02 |
| Customer A | Product 1 | 1 | 2 |
| Customer A | Product 2 | 3 | 4 |
| Customer B | Product 1 | 5 | 6 |
| Customer B | Product 2 | 7 | 8 |
and I would like to get:
| Customer | Product | Time | Sales |
| Customer A | Product 1 | 2018.01 | 1 |
| Customer A | Product 2 | 2018.01 | 3 |
| Customer B | Product 1 | 2018.01 | 5 |
| Customer B | Product 2 | 2018.01 | 7 |
| Customer A | Product 1 | 2018.02 | 2 |
| Customer A | Product 2 | 2018.02 | 4 |
| Customer B | Product 1 | 2018.02 | 6 |
| Customer B | Product 2 | 2018.02 | 8 |
Is it possible?
Solved! Go to Solution.
Hi maati1980,
To achieve your requirement, click Query Editor-> Transform-> click on colunm [2018.01] and [2018.02] -> Unpivot Columns, then rename "attribute" and "value" to "Time" and "Sales".
Regards,
Jimmy Tao
You would unpivot those columns. The best way would be to select your first two columns and then "Unpivot other columns".
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 23 | |
| 23 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 63 | |
| 38 | |
| 28 | |
| 23 | |
| 22 |