Expand and Transform Nested Tables in Excel Power Query
Question details
Transform machine-generated data by expanding nested tables into rows and reshaping the result into a usable table.

- Product
- Microsoft Excel Power Query
- Device & OS
- not provided
- Scenario
- A data source contains groups of nested tables that need to be expanded and arranged for analysis.
- Observed behavior
- The desired result is a flat table with selected nested fields and rows that can be updated when the source is refreshed.
Identify the source file or connection and check which columns contain Table, Record, or List values. Inspect a few nested values to see which fields you need and whether their structures are consistent.
Expand nested tables in Power Query Editor
Use the column header controls to extract nested fields and build a refreshable table without writing code.
In Excel, go to Data > Get Data and choose the appropriate source, or open an existing query from Data > Queries & Connections. Select Transform Data to open Power Query Editor.
Find columns whose cells show Table, Record, or List. Click a value to preview its contents and identify the fields to extract; use the Applied Steps pane to return to the previous view if needed.
Select the expand icon with two arrows in the nested-table column header. Choose the fields to extract, optionally clear the original-column-name prefix, and select OK.
Use the expand icon on any resulting Record or Table columns. For a List column, use its header control to expand the list to new rows before expanding any records or tables within it.
Use the column headers to remove or reorder fields and set appropriate data types. Select Home > Close & Load to return the result to Excel, then use Data > Refresh All when the source changes.

Expand a nested table with Power Query M
Use an M expression when you need explicit control over the nested column and output field names.
Work with Flattened Excel Data in WPS Spreadsheet
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface. Open compatible Excel files and continue working with flattened data; Excel Power Query transformations still need to be performed in Excel.

Frequently Asked Questions
How do I expand only certain fields from a nested table?
In Power Query Editor, select the expand icon in the nested-table column header, clear the fields you do not need, and select OK.
Why did expanding nested columns create extra rows?
Each row in a nested table can produce a row in the result. Expanding another nested column may create combinations of rows, so compare the expanded result with the source before loading it.
How do I expand a nested record instead of a table?
Select the expand icon in the Record column header, choose the fields you want, and select OK. Repeat for any nested fields that remain.
Will the transformation run again when the source changes?
Yes. After loading the query to Excel, use Data > Refresh All to rerun its applied steps against the updated source. Changes to the source structure may require you to edit the query.




