Power Query Problems

Expand an Excel Table Using Rows from Another Table with Power Query

Camila MilosovichCamila Milosovich Dec 2, 2026 868 views

Question details

Create an expanded Excel table by combining rows from one table with rows from another.

Expand an Excel Table Using Rows from Another Table
Product
Microsoft Excel Power Query
Device & OS
not provided
Scenario
The user wants to generate additional rows in a table based on the contents of a second table.
Observed behavior
The desired result is a table that pairs each row of the first table with every row of the second table and can be refreshed.
Before you start

Make sure both source ranges are formatted as Excel tables with headers. Check their names on the Table Design tab and confirm that the Power Query commands are available on the Data tab.

Solution 1Recommended

Expand each Excel table row with Power Query

Use this method to pair every row in Table1 with every row in Table2 and load the expanded result into Excel.

This creates a cross join: if Table1 has 3 rows and Table2 has 4 rows, the result has 12 rows. It loads a separate result rather than inserting rows into the original source table.

1
Load the second table

Click a cell in Table2, then select Data > From Table/Range. In Power Query Editor, check that the query is named Table2, then choose Home > Close & Load > Close & Load To and select Only Create Connection.

2
Open the first table

Click a cell in Table1 and select Data > From Table/Range to open it in Power Query Editor.

3
Add the second table as a column

Select Add Column > Custom Column. Name the column WBS and enter Table2 as the formula, using the exact name of the second query, then select OK.

4
Expand the nested rows

Select the expand icon in the WBS column header, choose the Table2 columns to include, and select OK.

5
Load and refresh the result

Select Home > Close & Load to place the result in Excel. After changing either source table, select Data > Refresh All to update the expanded result.

Expand each Excel table row with Power Query
Check the join behavior: Every Table1 row is paired with every Table2 row. If Table2 is empty, the expanded result has no rows.
Free Microsoft Office alternative

Work with Excel tables in WPS Spreadsheet

WPS Office is a free, lightweight alternative with a familiar interface and compatibility with common Excel formats, making it easy to move existing spreadsheets into WPS. The Power Query workflow described above requires Microsoft Excel.

Open and edit Microsoft Excel XLSX and XLS filesWork with spreadsheet tables in a familiar interfaceMove existing Office documents into a lightweight office suiteUse a free office suite for everyday spreadsheet tasks
microsoft office alternative - wps office

Frequently Asked Questions

Does this method add rows to the original Excel table?

No. Power Query creates a separate output table. The original source tables remain in place, and you can update the output with Data > Refresh All.

How many rows will the expanded table contain?

The result contains the number of Table1 rows multiplied by the number of Table2 rows. For example, 5 rows paired with 3 rows produce 15 rows.

What if I only want to combine rows that share a matching value?

Use Home > Merge Queries in Power Query Editor instead of adding the entire second table as a custom column. Select the matching columns in each table and choose the appropriate join type.

Why does the custom column formula not recognize Table2?

Check the second query's name in the Power Query Queries pane and use that exact name in Add Column > Custom Column. The query name may differ from the Excel table name.