Excel
#35

Normalizing Wide Cross-Tab Reports with Power Query Unpivot

MediumEY
Interview Question #35
Asked at EY

A client provides an expense budget where Column A is Department, and Columns B through M contain months ('Jan', 'Feb', ..., 'Dec') with dollar amounts. You cannot build a proper Pivot Table because the months are spread across 12 separate columns. Explain how to normalize this in Power Query using Unpivot.

Input Table: WideClientBudget (A1:E3)
2 rows preview
Department (Col A)Jan (Col B)Feb (Col C)Mar (Col D)
Marketing100001200015000
Engineering400004200045000
Expected Output Structure6 rows
DepartmentMonth (Attribute)Expense (Value)
MarketingJan10000
MarketingFeb12000
MarketingMar15000
EngineeringJan40000
EngineeringFeb42000
EngineeringMar45000
Interview Context

Asked frequently in data analyst and business analyst technical rounds. Focus on clean filtering, optimal indexing usage, and unambiguous column selection.

Microsoft Excel 365
E2fx
ABCDEF
1
Department (Col A)
Jan (Col B)
Feb (Col C)
Mar (Col D)
2
Marketing
10000
12000
15000
Target [Enter Formula]
3
Engineering
40000
42000
45000
4
5
6
7
Click on target cell E2 and enter your formula above.Shortcut: Click "Load Solution" to inspect
Chat with us