How to Transform Multiple Location Tables with Power Query in Excel
Question details
The user needs to reshape and consolidate data from multiple locations and item details into a single output table.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Reshaping scattered location data into a consolidated table without using complex XLOOKUP formulas.
- Observed behavior
- The data is currently separated by multiple locations and needs to be transformed into a single structured output table.
Ensure your source data is organized in a structured format, ideally formatted as an Excel Table (Ctrl+T), to make importing into Power Query easier.
Use Power Query to Consolidate Location Tables
Load your structured tables into Power Query and append or transform them to create a single consolidated dataset.
Power Query is an excellent tool for combining and reshaping data. Instead of manually copying and pasting or writing complex XLOOKUP formulas, you can set up a data transformation pipeline that updates automatically.
Select your location data ranges one by one and press Ctrl+T to format them as standard Tables.
Navigate to the Data tab on the ribbon and click 'From Table/Range' to load each table into the Power Query Editor.
In the Power Query Editor, use the 'Append Queries' feature from the Home tab to combine your multiple location tables into a single master table.
If your items and locations are in a matrix format, select the location columns, right-click, and choose 'Unpivot Columns' to reshape the data into a flat, tabular layout.
Click 'Close & Load' from the Home tab to return your transformed, consolidated data into a new worksheet.
Whenever new data is added to the source tables, right-click anywhere inside your new output table and select 'Refresh' to update the results instantly.

Consolidate Location Tables Easily in WPS Office
WPS Spreadsheet provides powerful built-in features like 'Consolidate Data' and multi-range PivotTables to combine scattered location tables without complex formulas.
- 1. Open your data file: Launch WPS Spreadsheet and open the workbook containing your multiple location tables.
- 2. Use Data Consolidate: Navigate to the Data tab on the top ribbon and click on the 'Consolidate' button to start combining your tables.
- 3. Select Data Ranges: Choose the calculation function you need (such as Sum or Average) and add the reference ranges for each location table.
- 4. Generate Output: Check 'Create links to source data' if you want automatic updates, then click OK to generate your consolidated table.

Frequently Asked Questions
Can I automatically update my consolidated table when new location data is added?
Yes. If using Power Query, simply right-click the output table and select 'Refresh'. All new data in the source tables will be processed and appended automatically.
Why is Power Query better than XLOOKUP for this task?
Power Query can reshape and append entire datasets dynamically without manual cell references. XLOOKUP requires writing complex nested formulas that can slow down workbook performance when dealing with large location tables.
Does WPS Spreadsheet support updating Power Query connections?
While WPS Spreadsheet handles complex data consolidation, PivotTables, and standard queries excellently, advanced M-code Power Query connections created in Excel may require Excel to edit. However, you can view and work with the resulting data seamlessly in WPS.
What should I do if my location tables have different column names?
In Power Query, you can rename columns before appending them, or just use the 'Append' feature which aligns columns by exact name. Any mismatched columns will still be added, but will display null values for the tables that lack them.




