Record Functions Overview

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

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

Geography and Geometry Functions

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

Information Functions

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

Modification Functions

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

Selection Functions

FunctionDescriptionInputOutput
Record.FieldReturns the value of the specified field in a record.RecordAny
Record.FieldOrDefaultReturns the value of the specified field in a record or the default value if the field is not found.RecordAny
Record.SelectFieldsReturns a record that contains only the specified fields.RecordRecord
BI Gorilla Blog

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