0
0
Power BIbi_tool~10 mins

Unpivoting columns in Power BI - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

Sales data for products over three months (Jan, Feb, Mar). Columns B, C, D represent monthly sales.

CellValue
A1Product
B1Jan
C1Feb
D1Mar
A2Apples
B230
C240
D250
A3Bananas
B320
C325
D330
Formula Trace
Unpivot columns Jan, Feb, Mar into attribute-value pairs
Step 1: Select columns Jan, Feb, Mar to unpivot
Step 2: For each row, create new rows for each selected column with attribute and value
Step 3: Resulting table columns: Product, Attribute (Month), Value (Sales)
Cell Reference Map
    A       B       C       D  
1 Product   Jan     Feb     Mar
2 Apples    30      40      50 
3 Bananas   20      25      30 
Original table with Product names in column A and monthly sales in columns B, C, D which are unpivoted.
Result
    A       B         C  
1 Product  Month    Sales
2 Apples   Jan      30  
3 Apples   Feb      40  
4 Apples   Mar      50  
5 Bananas  Jan      20  
6 Bananas  Feb      25  
7 Bananas  Mar      30  
Unpivoted table showing each product with month and corresponding sales as separate rows.
Sheet Trace Quiz - 3 Questions
Test your understanding
What does unpivoting do to the columns Jan, Feb, and Mar?
ADeletes these columns
BDuplicates the columns
CConverts them into rows with month names and sales values
DSummarizes sales by product
Key Result
Unpivot transforms selected columns into attribute-value pairs, creating one row per original row per selected column.