Table.ExpandListColumn
TableExpands a column containing lists into multiple rows, one row per list element.
Syntax
Table.ExpandListColumn(table as table, column as text) as tableParameters
| Name | Type | Required | Description |
|---|---|---|---|
table | table | Yes | The table containing a list column to expand. |
column | text | Yes | The name of the column containing list values. |
Return Value
table — A table where each list element in the named column becomes its own row, with all other column values duplicated.
Remarks
Table.ExpandListColumn unnests a column of lists, creating one row per element. All other columns in the row are repeated for each expanded value. If a list cell is empty, the row is removed from the result.
This is the standard way to flatten a column of lists created by operations like Table.Group with aggregated lists or JSON array expansion.
Examples
Example 1: Expand a list column into rows
let
Source = #table({"Name", "Tags"}, {{"Alice", {"A", "B"}}, {"Bob", {"C"}}}),
Expanded = Table.ExpandListColumn(Source, "Tags")
in
ExpandedResult
Name | Tags | |
|---|---|---|
| 1 | Alice | A |
| 2 | Alice | B |
| 3 | Bob | C |
Example 2: Flatten grouped results
let
Grouped = Table.Group(Sales, {"Region"}, {{"Orders", each [OrderID], type list}}),
Expanded = Table.ExpandListColumn(Grouped, "Orders")
in
ExpandedCompatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks