Record.Field

Record.Field is a Power Query M function that retrieves the value of the specified field in a record. The function returns the value of the field or throws an exception if the field is not found.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Record.Field(
   record as record,
   field as text,
) as any

Description

Returns the value of the specified field in the record. If the field is not found, an exception is thrown.

Examples

Find the value of field “CustomerID” in the record.

// Output: 1
Record.Field( [CustomerID = 1, Name = "Bob", Phone = "123-4567"], "CustomerID" )

Other functions related to Record.Field are:

BI Gorilla Blog

Last update: August 25, 2023 | Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/record-field
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.