Introduction
In real-world projects, data rarely comes in a perfect format. Sometimes:
Months are spread across columns
Categories are stored horizontally
Data needs restructuring before analysis
This is where Pivot and Unpivot in Power BI (Power Query Editor) become extremely powerful.
In this article, we’ll understand:
What Pivot is
What Unpivot is
Difference between them
Real business example
Step-by-step practical implementation
Performance Tip and Common Mistakes to avoid.
What is Unpivot in Power BI?
Unpivot converts columns into rows.
It transforms wide-format data into normalized (long) format.
Business Scenario Example
You receive sales data like this:
| Product | Jan | Feb | Mar |
|---|---|---|---|
| A | 100 | 120 | 130 |
| B | 200 | 210 | 220 |
This format looks fine in Excel — but for Power BI analysis, it’s not ideal.
We need it like this:
| Product | Month | Sales |
|---|---|---|
| A | Jan | 100 |
| A | Feb | 120 |
| A | Mar | 130 |
| B | Jan | 200 |
| B | Feb | 210 |
| B | Mar | 220 |
This transformation is called Unpivoting.
Practical Steps: How to Unpivot in Power BI
Step 1: Load the CSV File
Open Power BI Desktop
Click Home → Get Data → Text/CSV
Select your file . (Eg:
Pivot_Unpivot_Practice_Dataset.csv)Click Transform Data
Power Query Editor will open.


Step 2: Identify Fixed Columns
In our dataset:
Product
Region
These should remain unchanged.
The month columns:
Jan_2025
Feb_2025
Mar_2025
These need to be unpivoted.

Step 3: Unpivot the Month Columns
Option 1 (Recommended Method):
Select Product and Region
Go to Transform Tab
Click Unpivot Columns → Unpivot Other Columns
OR
Option 2:






Join the conversation! Your thoughts help the community grow.