Power Query Problems

Use Power Query to Organize Staff into Supervisor Groups in Excel

Jason MillerJason Miller Nov 11, 2026 868 views

Question details

The user wants to transform and reshape staff data spread across multiple columns into a structured format grouped by supervisors.

How to Use Power Query to Organize Staff into Supervisor Groups
Product
Excel
Device & OS
not provided
Scenario
Converting a wide dataset of staff allocations into a normalized table to facilitate supervisor grouping and reporting.
Observed behavior
Staff members are currently listed horizontally across columns (B:E), making it difficult to generate accurate PivotTables or reports without resorting to complex formulas.
Before you start

Make sure your source data is formatted as an official Excel Table by selecting your dataset and pressing Ctrl+T, so Power Query can reference it dynamically.

Solution 1Recommended

Unpivot Staff Columns Using Power Query

Normalize your data structure by unpivoting the position columns in Power Query, which cleanly aligns staff names alongside their specific supervisors for easy PivotTable generation.

By utilizing Power Query's Unpivot feature, you effortlessly transform wide columns into structured rows. This eliminates the necessity for nested VLOOKUP formulas, creating a lightweight, automatically updateable data source for reporting.

1
Upload Data to Power Query Editor

Select any cell inside your staff table, navigate to the Data tab on the Excel ribbon, and click 'From Table/Range'. This will launch the Power Query Editor window.

2
Select and Unpivot Columns

Hold down the Shift key and select the column headers containing the staff positions (e.g., Columns B through E). Right-click on one of the highlighted headers and select 'Unpivot Columns' from the context menu.

3
Clean and Rename Data

Rename the newly generated 'Attribute' column to 'Position' and the 'Value' column to 'Staff Name' by double-clicking the column headers. Open the filter drop-down on the 'Staff Name' column and uncheck 'null' or blank values to remove empty rows.

4
Load to Excel and Group

On the Home tab of the Power Query Editor, click 'Close & Load' to push the cleaned table back into Excel. From this new normalized table, you can click Insert > PivotTable to instantly group your staff lists by supervisor.

Unpivot Staff Columns Using Power Query
Maintainable Reporting: Once configured, simply paste new staff data into your original table, go to the Data tab, and click 'Refresh All'. Your PivotTable and transformed reports will update automatically.
Free Microsoft Office alternative

Need a simpler way to manage and group spreadsheet data?

While Power Query offers advanced data transformation features, everyday data grouping, sorting, and pivoting can be completed effortlessly with WPS Office. Enjoy a free, lightweight suite equipped with robust PivotTable reporting completely compatible with your existing datasets.

  1. 1. Download the Suite: Visit the WPS Office website to download the free software, and follow the simple installation instructions to set it up on your device.
  2. 2. Open Your Workbooks: Launch WPS Spreadsheet and instantly open your existing Excel workbooks without losing any formatting or data.
  3. 3. Summarize with Ease: Highlight your datasets and navigate to Insert > PivotTable to start grouping your supervisors and reporting instantly.
Fully compatible with Microsoft Excel formats (.xlsx, .xls, .csv)Intuitive PivotTable and data sorting features for easy staff groupingQuick and lightweight installation for smooth performance on any PCFree to use with a highly familiar and seamless user interface
microsoft office alternative - wps office

Frequently Asked Questions

What does unpivoting columns mean in Excel data management?

Unpivoting transforms a 'wide' dataset (data stretched horizontally across multiple columns) into a 'tall' dataset (rows). It normalizes the data, making it much easier to filter, summarize, and use as the foundation for a PivotTable.

Why should I use Power Query instead of complex VLOOKUP formulas to group staff?

VLOOKUP or INDEX/MATCH formula structures can become highly complex and slow down your workbook when dealing with dynamic, expanding team lists. Power Query resolves this by cleaning the data instantly in the background, creating structured output tables that are scalable and far easier to maintain.

Will my Power Query output update automatically when I assign new staff to a supervisor?

Yes. Once you establish the initial Power Query structure, you only need to type new staff details into your source table, navigate to the Data tab, and click 'Refresh All'. Your normalized table and any attached PivotTables will instantly reflect the incoming changes.

Why can't I find the Power Query or Unpivot option in my version of Excel?

Power Query comes built-in on the Data tab for Excel 2016 and newer (often labeled 'Get & Transform Data'). If you use Excel 2010 or 2013, it must be installed as a separate free add-in from Microsoft. In very outdated versions, the feature is unavailable.