How can I transpose a table in Power BI?

Power BI is a powerful business intelligence platform that allows users to visualize and analyze data. Transposing a table in Power BI refers to the process of rotating a table’s rows and columns, essentially flipping the data on its axis. This can be useful when organizing and presenting data in a different format. To transpose a table in Power BI, users can use the “Transpose Table” function under the “Transform” tab in the query editor. This function will automatically switch the rows and columns of the selected table. This feature is particularly useful when dealing with large amounts of data and can help users gain new insights into their data.

Transpose a Table in Power BI (With Example)


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 .

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:

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:

Additional Resources

The following tutorials explain how to perform other common tasks in Power BI:

x