Unpivot Table in Power BI

Power BI Unpivot table option converts selected columns into rows. Let us see how to create an Unpivot table or how to convert the pivot table into the unpivot table in Power BI with an example.

How to create unpivot Table in Power BI

To create or convert pivot to unpivot table, please click the Edit Queries option under the Home tab.

pivot Table Edit Queries Option 1

Clicking the Edit Queries option opens a new window called the Power BI Power Query Editor.

In this example, we are going to unpivot the columns 2005, 2006, 2006, and 2007.

Unpivot Table in Power BI 2

There are a couple of ways for this

The First approach to unpivot table in Power BI

Please select the columns that you don’t want to unpivot, or you want to keep them unchanged will open the context menu. Select the Unpivot Other Columns option. This unpivots all the columns except the selected ones.

Choose Unpivot Other Columns Option 3

Now you can see the unpivoted table.

Unpivot Table in Power BI 4

The second approach to unpivot table in Power BI

Please select the columns you want to use and right-click on them to open the context menu. Next, select the Unpivot Only Selected Columns option. And this option unpivots all the selected columns.

Choose Unpivot Only Selected Columns Option 5

Now you can see the unpivoted table

Unpivot Table in Power BI 6

The third approach

In order to convert the pivot table, go to Transform Tab. Under this tab, you can find the Unpivot Column button, as shown below.

Unpivot Table in Power BI 7

Use the drop-down list to perform this operation. We selected the Product ID and Name columns for the demonstration purpose and then set the Unpivot Other columns option.

Unpivot Table in Power BI 8

Now you can see the unpivoted table.

Unpivot Table in Power BI 9

We renamed the columns to more meaningful ones. Next, hit the Close & Apply option under the Home tab to apply these changes.

Rename Unpivot Column 10

From the screenshot below, you can see those columns on the right side.

Unpivot Table in Power BI 11