By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
For engineers who need to reshape data fast—without guesswork.
You’ve inherited a Power BI report where sales data is stored in a wide format (columns for each month: Jan, Feb, Mar, …). Your boss asks for a trend analysis by product, but the current table structure makes this impossible—you can’t filter, group, or visualize trends without reshaping the data first.
Jan
Feb
Mar
This is where Unpivot, Pivot, Transpose, and Fill Down/Up come in.- Unpivot turns columns into rows (e.g., Jan: 100, Feb: 200 → Month: Jan, Value: 100).- Pivot turns rows into columns (the reverse of unpivot).- Transpose flips rows ↔ columns (like Excel’s TRANSPOSE).- Fill Down/Up propagates values into blank cells (e.g., filling missing dates in a time series).
Jan: 100, Feb: 200
Month: Jan, Value: 100
TRANSPOSE
Why this matters in production:- Broken visuals: Power BI can’t aggregate or filter data in a wide format. Unpivoting is required for time-series charts, matrices, or drill-downs.- ETL nightmares: If you don’t reshape data early, you’ll waste hours writing DAX measures to work around bad structure.- Performance: Wide tables bloat memory. Unpivoted data is leaner and faster to process.- Automation: These transformations let you clean messy Excel exports or API responses before they hit your model.
Real-world scenario:You’re handed a CSV where each row is a product, and columns are months (Product | Jan | Feb | Mar). To build a line chart of sales over time, you must unpivot the months into a Date column. If you don’t, your chart will show products on the X-axis instead of time—useless for trend analysis.
Product | Jan | Feb | Mar
Date
Attribute
Value
2023-01
2023-02
SAMEPERIODLASTYEAR
Product | Q1 | Q2 | Q3
Unpivot
Pivot
Region | Subregion | Sales
Subregion
Date | Value
SUM
CALCULATE
Prerequisites:- Power BI Desktop installed.- A table like this (copy into Excel or Power BI):
Goal: Unpivot the months into a Date column for a line chart.
Load the table (name it Sales).
Sales
Open Power Query Editor:
Click Transform Data to open Power Query.
Unpivot the months:
Product
Ctrl
Month
Result:
powerquery Date.FromText("2023-" & [Month] & "-01")
Remove the Month column.
Close & Apply:
Click Close & Apply to load the data into Power BI.
Build the line chart:
Prerequisites:- A table with missing values:
Goal: Fill down the Subregion column so every row has a value.
CustomerID
User
Sales_Unpivoted
Unpivoted_Months
Step 3
Original rows * unpivoted columns
ProductID
Date.FromText
Region > Subregion
Answer: Unpivot the months into a Date column.
Fill Down scenario:
Answer: Use Fill Down on the Subregion column.
Pivot vs. Unpivot trap:
Answer: Only for matrix-style layouts (e.g., Product | Q1 | Q2). For analysis, always unpivot.
Product | Q1 | Q2
Transpose warning:
Region
Challenge:You have this table in Power BI:
Task:1. Unpivot the months into a Date column.2. Fill down the Manager column (Charlie’s manager is missing).3. Convert the Date column to a proper date format.
Manager
Solution:1. Select Employee and Manager columns > Unpivot Other Columns.2. Rename Attribute to Month, Value to Sales.3. Add a custom column: Date.FromText([Month] & "-01").4. Select Manager column > Fill Down.5. Remove the Month column.
Employee
Date.FromText([Month] & "-01")
Why it works:- Unpivoting creates a tall table for analysis.- Fill Down ensures Charlie’s manager is Bob.- Converting to a date enables time intelligence.
Bob
Alt + P, U, O
Alt + T, P
Alt + T, T
Alt + T, F, D
Alt + T, F, U
Date.FromText([Column])
Alt + H, R, B
Ctrl + H
⚠️ Exam Traps:- Default date format: Power BI may not recognize Jan as a date—always convert to YYYY-MM-DD.- Unpivoting keys: Never unpivot primary keys (e.g., ProductID). Only unpivot measures (e.g., Sales).- Fill Down order: Ensure data is sorted correctly before filling (e.g., Region before Subregion).
YYYY-MM-DD
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.