Record Functions Overview

Updated on

Explore Record Functions in Power Query M Language, crucial for manipulating record data. This page provides a comprehensive list and descriptions of Record Functions available in the M Language.

Table of contents

Creation and Conversion Functions

FunctionDescription
Record.FromListReturns a record given a list of field values and a set of fields.
Record.FromTableCreates a record from a table of the form {[Name = name, Value = value]}.
Record.ToListReturns a list of values containing the field values of the input record.
Record.ToTableReturns a table with each row being a field name and value of the input record.

Geography and Geometry Functions

FunctionDescription
Geography.FromWellKnownTextTranslates text representing a geographic value in Well-Known Text (WKT) format into a structured record.
Geography.ToWellKnownTextTranslates a structured geographic point value into its Well-Known Text (WKT) representation.
GeographyPoint.FromCreates a record representing a geographic point from parts.
Geometry.FromWellKnownTextTranslates text representing a geometric value in Well-Known Text (WKT) format into a structured record.
Geometry.ToWellKnownTextTranslates a structured geometric point value into its Well-Known Text (WKT) representation.
GeometryPoint.FromCreates a record representing a geometric point from parts.

Information Functions

FunctionDescription
Record.FieldCountReturns the number of fields in the record.
Record.FieldNamesReturns the names of the fields.
Record.FieldValuesReturns a list of the field values.
Record.HasFieldsIndicates whether the record has the specified fields.

Modification Functions

FunctionDescription
Record.AddFieldAdds a field to a record.
Record.CombineCombines the records in the given list.
Record.RemoveFieldsRemoves the specified field(s) from the input record.
Record.RenameFieldsApplies rename(s) from a list in the form { old, new }.
Record.ReorderFieldsReorders the field(s) specified into the new order.
Record.TransformFieldsReturns a record after applying specified transformations.

Selection Functions

FunctionDescription
Record.FieldReturns the value of the specified field in a record.
Record.FieldOrDefaultReturns the value of the specified field in a record or the default value if the field is not found.
Record.SelectFieldsReturns a record that contains only the specified fields.

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

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy