How to UnPivot Data in Excel (Normalize Data)

A report with a column for each month or product is easy to read but hard to analyse. Unpivoting turns those columns into rows, one value per row, so you can filter, sort and build PivotTables. Power Query does it in one click and refreshes.

Best methodPower Query → Unpivot Columns
No Power QueryPivotTable Wizard (Alt, D, P)
ResultThree columns: item, attribute, value

Why unpivot?

In a report, the same kind of value is spread across many columns. Normalized data keeps each kind of value in one column.

Sales data in report format
The same data in normalized form
Filtering and sorting normalized data

Method 1: Power Query

  1. Click in the report → Data → From Table/Range → OK.
  2. Select the first column (the one to keep), right-click its header → Unpivot Other Columns.
  3. Rename Attribute and Value (for example Month and Sales).
  4. Home → Close & Load.
Report data to unpivot
Unpivot Other Columns on the right-click menu in Power Query

Use Unpivot Other Columns, not Unpivot Columns. It names the column to keep, so a new month added to the report is unpivoted automatically on refresh.

Normalized table updated after refresh

Method 2: PivotTable and PivotChart Wizard

This works in every Excel version, but doesn’t refresh.

  1. Press Alt, D, P to open the wizard (or add it to the Quick Access Toolbar from All Commands).
  2. Choose Multiple consolidation ranges → Next → I will create the page fields → Next.
  3. Select the report range, click Add, then Finish.
  4. In the new PivotTable, double-click the Grand Total value. Excel creates a sheet with every value as its own row: that’s your normalized data.
Adding the PivotTable and PivotChart Wizard to the toolbar
Multiple consolidation ranges option
Selecting and adding the range
PivotTable created by the wizard
Double-clicking the grand total
Normalized data from the drill-down

The wizard uses only the first column as the row label. For reports with two label columns, use Power Query.

Excel 365 formula

For a report in A1:E4 (names in A2:A4, months in B1:E1):

=HSTACK(TOCOL(IF(SEQUENCE(1,COLUMNS(B1:E1)),A2:A4)),TOCOL(IF(SEQUENCE(ROWS(A2:A4)),B1:E1)),TOCOL(B2:E4))

IF with SEQUENCE repeats the names across and the months down, and TOCOL turns each block into one column.

Video

Related