Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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".
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 46 | |
| 34 | |
| 27 | |
| 15 | |
| 15 |
| User | Count |
|---|---|
| 59 | |
| 58 | |
| 39 | |
| 22 | |
| 20 |