Record.Combine

Record

Merges a list of records into a single record.

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

Syntax

Record.Combine(records as list) as record

Parameters

NameTypeRequiredDescription
recordslistYesA list of records to merge into one. If multiple records share the same field name, the value from the last record in the list is used.

Return Value

recordA single record containing all fields from the input records.

Remarks

Record.Combine merges a list of records into a single record containing all unique fields. When two or more records share the same field name, the value from the last record in the list takes precedence. This is useful for combining fields from different sources — for example, merging a Sales row with a Customers row to create a unified record. Be mindful of overlapping field names; rename or remove duplicates beforehand if you need to preserve both values.

Examples

Example 1: Combine fields from Sales and Customers rows

let
    SalesRow = Record.SelectFields(Sales{0}, {"OrderID", "Product", "UnitPrice"}),
    CustomerRow = Record.SelectFields(Customers{0}, {"CustomerID", "Name", "City"}),
    Combined = Record.Combine({SalesRow, CustomerRow})
in
    Record.ToTable(Combined)
Result
Name
Value
1OrderID1
2ProductWidget A
3UnitPrice25
4CustomerID1
5NameAlice
6CityNew York

Compatibility

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