Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Power Query Table.ExpandListColumn: How-To Guide

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Table.ExpandListColumn is the Power Query function that takes a column containing lists and turns each list item into its own row, duplicating the other column values for each item. You use it when a column holds multiple values per row—for example, a cell containing several tags, product codes, or JSON array items—and you need a flat table for filtering, merging, or loading to a data model. The function is available in Power Query for Excel, Power BI, and Dataflows; the steps below use the Power Query Editor interface, which is nearly identical across those hosts. One note before you start: menu labels can differ slightly by version, device, and region, but the core commands are stable.

What You'll Need

  • A table loaded into Power Query. If your data is in Excel, select a cell in the table and use Data > From Table/Range; in Power BI Desktop, use Home > Transform data to open the editor.
  • At least one column whose values are lists. A list column shows the word List in each cell rather than the actual values. If you see text like "[a, b, c]" instead, the column is text, not a list, and Table.ExpandListColumn will not work until you convert it.
  • A clear idea of which column you want to expand. Expanding the wrong column can multiply rows unexpectedly, so confirm the list column first.

Step-by-Step

  1. Open the Power Query Editor with your table loaded. Check the column headers and confirm which column contains lists—the cells will display the word List, sometimes with a small icon.
  2. If the list column was created by a previous step such as parsing JSON or splitting by delimiter, verify that step produced a list. If the column shows plain text, use Transform > Split Column or a custom column with Text.Split to create a proper list first.
  3. Select the list column by clicking its header. You do not need to select any other column.
  4. On the Home tab, click the Expand button (it may be labelled Expand Column or appear as a small icon with two arrows pointing outward). In some versions this is under the Transform tab. The exact label can differ by version, so look for the expand icon near the column header as an alternative.
  5. Choose Expand to New Rows from the menu. Do not choose "Expand" with a delimiter option—that is for record columns. The command name in the formula bar will be Table.ExpandListColumn.
  6. Review the result. Each list item now appears on its own row, and the other columns repeat their values for each item. For example, a row with ID 1 and list {A, B} becomes two rows: ID 1 / A and ID 1 / B.
  7. Check the row count. The Applied Steps pane shows each transformation; click the step before expansion and compare row counts to confirm the multiplication is expected.
  8. If you need to remove duplicates created by the expansion, select the relevant columns and use Home > Remove Rows > Remove Duplicates. Do this only if duplicate rows are genuinely unwanted.
  9. Rename the expanded column if needed by double-clicking its header, then close and load with Home > Close & Load (Excel) or Home > Close & Apply (Power BI).

If you prefer writing M directly, the equivalent step is Table.ExpandListColumn(PreviousStep, "ColumnName"). You can add this in the Advanced Editor, but the button approach is safer because it handles column references correctly.

Common Mistakes

  • Expanding a text column. Table.ExpandListColumn expects a list. If the column contains comma-separated text, the command will error or do nothing useful. Split the text into a list first.
  • Expanding the wrong column. If multiple columns contain lists, expanding one at a time is fine, but expanding a column you did not intend multiplies rows and can distort totals.
  • Assuming row multiplication is a bug. Expansion intentionally duplicates other column values. If you expected one row per original record, you need a different approach, such as aggregating the list into a single text value.
  • Forgetting nulls. A null in the list column stays as a single row with null; it does not disappear. Filter nulls afterward if needed.
  • Losing the original step. Expansion is not reversible by undo in all cases; use the Applied Steps pane to delete the step and return to the previous state.

Tips

  • Expand early in the query if later steps depend on one row per list item; expanding late can make merges and filters behave unexpectedly.
  • Use the formula bar to confirm the exact column name passed to Table.ExpandListColumn; column names with spaces or special characters are quoted automatically.
  • If you need to keep the original list alongside the expanded rows, duplicate the column first (right-click the header > Duplicate Column) and expand only the copy.
  • For nested lists (a list of lists), expand once, then expand again on the resulting list column.
  • Check data types after expansion; list items often come through as Any, so set the correct type with Transform > Data Type.

Troubleshooting

If the Expand button is greyed out, the selected column is not a list. Confirm the cells show List; if they show text, convert the column first. If you get an error such as "We cannot convert a value of type Text to type List," the column contains text values—use Split Column or a custom column with Text.Split before expanding. If the expansion produces far more rows than expected, check whether another list column was expanded earlier or whether the source contains duplicate list items. If the query is slow after expansion, reduce columns before expanding and filter rows early. If the expanded values look wrong, step back through Applied Steps to find where the list was created and verify that step's output. When a step fails after a source change, delete the expansion step and reapply it so the column reference updates.

Frequently Asked Questions

What does Table.ExpandListColumn do?

It converts a column of lists into rows, one row per list item, repeating the other column values for each item.

Can I expand more than one list column at once?

No. Expand one list column per step. Expanding a second list column afterward will multiply rows again, so plan the order carefully.

Why is my Expand button greyed out?

The selected column is not a list. Check that cells display List; if they contain text, split the text into a list first.

Does expansion delete blank or null values?

No. Nulls remain as rows with null values. Filter them out afterward if you do not want them.

How do I undo an expansion?

In the Applied Steps pane, click the step before the expansion, or right-click the expansion step and delete it. The query returns to its previous state.

Can I use Table.ExpandListColumn in Power BI and Excel?

Yes. The function is part of the Power Query M language and works in Excel, Power BI Desktop, and Dataflows, though the button location may differ slightly.