Record.ReorderFields Function in Power Query

The Record.ReorderFields function returns a new record that reorders fields relative to each other. Any fields not specified remain in their original locations.

Syntax

Record.ReorderFields(record as record, fieldOrder as list, optional missingField as nullable number) as record

Example: Reorder some of the fields in the record.

Power Query M

let
    Source = Record.ReorderFields([CustomerID = 1, Name = "Ashish", Phone = "123-4567", Company = "TCS"], {"Company", "Name"})
in
    Source  

The output of the above code is shown below:

Record.ReorderFields function in Power Query