List.Combine
ListMerges multiple lists into a single list.
Syntax
List.Combine(lists as list) as listParameters
| Name | Type | Required | Description |
|---|---|---|---|
lists | list | Yes | A list of lists to combine into one. |
Return Value
list — A single list containing all items from the input lists, in order.
Remarks
List.Combine concatenates multiple lists into a single flat list. This is useful when you need to merge column values from different tables, or when building a combined list from multiple sources.
Examples
Example 1: Combine customer names from two tables
let
SalesNames = List.Distinct(Table.Column(Sales, "CustomerName")),
CustomerNames = Table.Column(Customers, "Name"),
Combined = List.Distinct(List.Combine({SalesNames, CustomerNames}))
in
#table({"Name"}, List.Transform(Combined, each {_}))Result
Name | |
|---|---|
| 1 | Alice |
| 2 | Bob |
| 3 | Charlie |
| 4 | Diana |
Compatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks