Table.ExpandListColumn

Table

Expands a column containing lists into multiple rows, one row per list element.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

Table.ExpandListColumn(table as table, column as text) as table

Parameters

NameTypeRequiredDescription
tabletableYesThe table containing a list column to expand.
columntextYesThe name of the column containing list values.

Return Value

tableA 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
    Expanded
Result
Name
Tags
1AliceA
2AliceB
3BobC

Example 2: Flatten grouped results

let
    Grouped  = Table.Group(Sales, {"Region"}, {{"Orders", each [OrderID], type list}}),
    Expanded = Table.ExpandListColumn(Grouped, "Orders")
in
    Expanded

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks