Record.RenameFields Function in Power Query
The Record.RenameFields function returns a new record that renames the fields specified. The resultant fields will retain their original order.
Syntax
Record.RenameFields(record as record, renames as list, optional missingField as nullable number) as record
Example: Rename the “Name” column to “Employee Name” and “Company” to “Org”.
Power Query M
let MyTable = Record.RenameFields( [CustomerID = 1, Name = "Ashish", Phone = "123-4567", Company = "TCS"], {{"Name", "Employee Name"}, {"Company", "Org"}} ) in MyTable
The output will be shown in the following image: