Record.RemoveFields Function in Power Query

The Record.RemoveFields function returns a record after removing all the fields specified in given list from the input record.

Syntax

Record.RemoveFields(record as record, fields as any, optional missingField as nullable number) as record

Example:

Power Query M

let
  source = [CustomerID = 1, Name = "Ashish", Phone = "123-4567"], 
  Return = Record.RemoveFields(source, {"Phone"})
in
  Return

The output of the above code is shown below in the following image:

Record.RemoveFields function in Power Query