Record.RemoveFields
This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.
Returns a record that removes all the fields specified in a list. If the field specified does not exist, an exception is thrown.
Record.RemoveFields(record as record, fields as any, optional missingField as nullable number) as record
| Argument | Description |
|---|---|
| record | The Record to modify. |
| fields | A list of two items with the names of the fields that need to exchange their order in the record. |
| optional missingField | A MissingField enum value to handle missing fields. The default value is MissingField.Error. |
MissingField enum
MissingField.Error = 0; MissingField.Ignore = 1; MissingField.UseNull = 2;
Record.RemoveFields([CustomerID=1, Item = "Fishing rod", Price=18.00] , "Price") equals [CustomerID=1, Item="Fishing rod"]
| CustomerID | 1 |
| Item | Fishing rod |
Show: