Table.ExpandListColumn
Syntax
Table.ExpandListColumn(table as table, column as text) as table
About
Given a table
where column
contains a list of values, splits the list into a row for each value. Values in the other columns are duplicated in each new row created. This function can also expand nested tables by treating them as lists of records.
Example 1
Split the list column [Name].
Usage
Table.ExpandListColumn(
Table.FromRecords({[Name = {"Bob", "Jim", "Paul"}, Discount = .15]}),
"Name"
)
Example 2
Split the nested table column [Components].
Usage
Table.ExpandListColumn(
#table(
{"Part", "Components"},
{
{"Tool", #table({"Name", "Quantity"}, {{"Thingamajig", 2}, {"Widget", 3}})}
}
),
"Components"
)
Output
Table.FromRecords({
[Part = "Tool", [Name = "Thingamajig", Quantity = 2],
[Part = "Tool", [Name = "Widget", Quantity = 3]
})
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for