Record.Field

Record

Returns the value of a specific field from a record.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

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

Parameters

NameTypeRequiredDescription
recordrecordYesThe record to retrieve the field value from.
fieldtextYesThe name of the field to return.

Return Value

anyThe value of the specified field.

Remarks

Record.Field retrieves the value of a single field by name from a record. This is the functional equivalent of bracket-access notation (record[FieldName]), but allows the field name to be supplied dynamically as a text value — which is useful when field names are computed at runtime or stored in a variable.

Examples

Example 1: Get the Product from the first Sales row

let
    ProductValue = Record.Field(Sales{0}, "Product")
in
    #table({"Product"}, {{ProductValue}})
Result
Product
1Widget A

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks