Record.RenameFields is a Power Query M function that renames fields in a record to the new field names specified in a list. The function returns a new record with the fields renamed according to the provided renames list.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Record.RenameFields( record as record, renames as list, optional missingField as nullable number, ) as record
|missingField||optional||The MissingField.Type determines the function’s reaction to operations on missing columns. When omitted, it uses MissingField.Error and generates an error for missing columns. Alternatives include MissingField.UseNull, substituting null for missing columns, and MissingField.Ignore, which ignores missing columns.|