Record.FieldCount

Updated on

Record.FieldCount is a Power Query M function that calculates the number of fields in a given record. The function returns the total number of fields present in the input record.

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

Syntax

Record.FieldCount( record as record ) as number

Description

Record.FieldCount returns the total count of fields present in a record.

Examples

Find the number of fields in the record.

// Output: 2
Record.FieldCount( [CustomerID = 1, Name = "Bob"] )

Other functions related to Record.FieldCount are:

BI Gorilla Youtube Channel

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/record-fieldcount