The easiest way to transpose a table in Power BI is to use the Transpose feature in the Transform tab in the Power Query Editor.
The following example shows how to use this feature in practice.
Example: How to Transpose a Table in Power BI
Suppose we have the following table in Power BI named my_data that shows the total sales and returns at some retail store during six consecutive years:
Suppose that we would like to transpose the table from a long format to a wide format.
In other words, we would like to display the Sales and Returns along the rows and the Years along the columns.
To do so, click the Home tab along the top ribbon, then click the Transform data icon:
This will bring up the Power Query Editor.
Next, click the Transform tab, then click dropdown arrow under Use First Row as Headers, then click Use Headers as First Row:
This will cause the headers to be used as the first row:
Next, click the Transform tab, then click the Transpose icon:
This will transpose the rows and the columns of the table:
Next, click the Transform tab, then click dropdown arrow under Use First Row as Headers, then click Use First Row as Headers:
This will cause the years in the first row to be used as the column names:
Once you exit out of the Power Query Editor, a message box will appear that asks if you’d like to apply your changes.
Once you click Yes, the original table will be transposed:
The following tutorials explain how to perform other common tasks in Power BI: