Power Query Problems

Convert Cross-Tab Data into Rows with Excel Power Query

Maira MehtabMaira Mehtab Dec 2, 2026 868 views

Question details

Convert employee activity data from separate task columns into a normalized table with one task per row.

Convert Cross-Tab Data into Rows with Excel Power Query
Product
Microsoft Excel Power Query
Device & OS
not provided
Scenario
Employee, location, and address fields identify each record, while task quantities are stored across separate columns.
Observed behavior
The desired table repeats the identifying fields for each task and places task names and quantities in separate columns.
Before you start

Check that the source data has a single header row and identify the columns that should remain as employee and location identifiers. Confirm that Power Query is available in your version of Excel.

Solution 1Recommended

Unpivot Task Columns with Excel Power Query

Use this method to create a normalized table that can be refreshed when the source data changes.

1
Load the source data

Select a cell in the source range, then choose Data > From Table/Range. Confirm the range and select My table has headers if prompted.

2
Select the identifier columns

In Power Query Editor, select the Employee, Zone, City, and Street columns. Hold Ctrl while clicking each header to select multiple columns.

3
Unpivot the remaining columns

Choose Transform > Unpivot Columns > Unpivot Other Columns. The task column headers become values in an Attribute column, and their quantities appear in a Value column.

4
Rename and filter the results

Double-click the Attribute and Value headers and rename them Task and Quantity. Use the Quantity column's filter to remove any remaining blanks or nulls, while retaining zero quantities if they are meaningful.

5
Load the normalized table

Choose Home > Close & Load to place the results in Excel. When the source data changes, use Data > Refresh All to update the query.

Unpivot Task Columns with Excel Power Query
Loading into a database: The normalized Excel table can be used as a source for a separate database import. The database import steps depend on the destination.
Free Microsoft Office alternative

Work with Employee Activity Tables in WPS Spreadsheets

WPS Office is a free, lightweight alternative for opening and editing spreadsheets in a familiar interface. Its Microsoft Office format compatibility makes it easier to move existing files between applications, although it does not replace Excel's Power Query workflow.

Open and review employee activity tables in WPS Spreadsheets.Compatible with Microsoft Excel XLSX and XLS files.Use a familiar spreadsheet interface to ease migration from Microsoft Office.Work with a free, lightweight office suite.
microsoft office alternative - wps office

Frequently Asked Questions

Why should I select the identifier columns before unpivoting?

Selecting Employee, Zone, City, and Street before choosing Transform > Unpivot Other Columns keeps those fields as identifiers while turning the remaining task columns into rows.

Will new task columns be included when I refresh?

Unpivot Other Columns can include new task columns as long as they are part of the source table and are not selected as identifier columns. After adding them, choose Data > Refresh All.

Are blank quantities included in the result?

Power Query generally omits null values during unpivoting. Check the Quantity column filter for any remaining blank values; zero is a value and should be kept if it is meaningful.

Can formulas do this instead of Power Query?

Yes. Dynamic-array formulas in supported Excel versions can reshape the data and recalculate automatically, but the formulas can be complex. Power Query is often easier to maintain if refreshing the results is acceptable.