Record.AddField is a Power Query M function that adds a field to a record, given the name of the field and its value. The function returns a new record with the specified field added to it.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Record.AddField( record as record, fieldName as text, value as any, optional delayed as nullable logical, ) as record
Adds a field to a record
record, given the name of the field
fieldName and the value
Add the field Address to the record.
// Output: [CustomerID = 1, Name = "Bob", Phone = "123-4567", Address = "123 Main St."] Record.AddField( [CustomerID = 1, Name = "Bob", Phone = "123-4567"], "Address", "123 Main St." )
Other functions related to Record.AddField are: