Transpose table in report visual in Power BI Desktop

Viewed 35671

This is how my table looks like in Power BI Desktop:

enter image description here

In the 1st column, we have the year, and in the n remaining columns the indicators.

I'd like to build a matrix visual with the indicators in the rows and years in columns.

Now, I know I can unpivot all the columns except the year in the query editor. But the structure above is necessary to build charts where the x-axis is the year and the series is only one or two indicators.

Is there a way (a measure, calculated table or other) to build the matrix I need?

Thanks!

2 Answers

Open the excel data you want to transpose in power query editor. go to transform tab. and drop down "use first row as header" and select "use header as first row" -> this will add one more row at the top of the data as shown in the second screenshot1

2

and then click on transpose button. you can see the data has been transposed. 3

If you want to remove the first row, drop down "use first row as header" and select "use first row as header"

Related