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.
Please click the Edit Queries option under the Home tab to create a pivot table or convert unpivot. Clicking the Edit Queries option opens a new Power BI Query Editor window. We will change the calendar year column based on the order quantity in this example.
How to create a Power BI Pivot Table
To convert the unpivot into a pivot table, go to the Transform Tab. Under this tab, you can find the pivot Column button, as shown below.
Clicking the 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 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 Power BI Pivot table. Remember, having more than one unchanged static column will not make any difference in creating it.
Let me reorder the Columns as per the Year. Next, hit the Close & Apply option under the Home tab to apply these changes.
From the screenshot below, you can see those columns.
Comments are closed.