The Pivot table option converts selected rows into columns. Let me show you how to create a pivot table or convert the unpivoted into a pivot table in Power BI with an example.
How to create a Power BI Pivot Table
To create a Power BI pivot table or to convert unpivot, please click the Edit Queries option under the Home tab.
Clicking Edit Queries option opens a new window called Power BI Power Query Editor.
In this example, we are going to pivot the calendar year column based on the order quantity.
To convert the unpivot into a pivot table, go to Transform Tab. Under this tab, you can find the pivot Column button as shown below.
Clicking the pivot Column button opens the following window.
Let me select the Order Quantity as the values column
Next, we selected the Sum as the aggregate function value
Now you can see the Power BI pivot table
What if your table had more than one static column (a column that won’t change in the pivot process)? For this, we added one more column called Product Id to this table.
Let me select the Order Quantity column as the values column, and Sum as the aggregate function
Now you can see the Pivot table in Power BI. Remember, having more than one unchanged static column will not make any difference in creating it.
Next, hit the Close & Apply option under the Home tab to apply these changes.
From the screenshot below, you can see the pivot columns.