Record.Combine

Updated on

Record.Combine is a Power Query M function that combines the records in the given records. The function returns a single record that contains all the fields from the input records, or an error if any input value is not a record.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Record.Combine( records as list ) as record

Description

Record.Combine merges multiple records from a list into a single record. It throws an error when you include non-record items within the list, as the function expects a consistent record format for the operation.

Examples

Create a combined record from the records.

// Output: [CustomerID = 1, Name = "Bob", Phone = "123-4567"]
Record.Combine( {
    [CustomerID = 1, Name = "Bob"],
    [Phone = "123-4567"]
} )

Other functions related to Record.Combine are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/record-combine