Type Functions Overview

Discover Type Functions in Power Query M Language, essential for manipulating type information. This page provides a comprehensive list and descriptions of Type Functions available in the M Language.

Function Type

FunctionDescriptionInputOutput
Type.ForFunctionReturns a type that represents functions with specific parameter and return type constraints.RecordType
Type.FunctionParametersReturns a record with field values set to the name of the parameters of a function type, and their values set to their corresponding types.TypeRecord
Type.FunctionRequiredParametersReturns a number indicating the minimum number of parameters required to invoke the type of function.TypeNumber
Type.FunctionReturnReturns a type returned by a function type.TypeType

Record Type

FunctionDescriptionInputOutput
Type.ClosedRecordReturns a closed version of the given record type (or the same type, if it is already closed).TypeType
Type.ForRecordReturns a type that represents records with specific type constraints on fields.RecordType
Type.IsOpenRecordReturns whether a record type is open.TypeLogical
Type.OpenRecordReturns an opened version of the given record type (or the same type, if it is already open).TypeType
Type.RecordFieldsReturns a record describing the fields of a record type with each field of the returned record type having a corresponding name and a value.TypeRecord

Table Type

FunctionDescriptionInputOutput
Type.AddTableKeyAdds a key to the given table type.TypeType
Type.ReplaceTableKeysReturns a new table type with all keys replaced by the specified list of keys.TypeType
Type.TableColumnReturns the type of a column in a table.TypeType
Type.TableKeysReturns the possibly empty list of keys for the given table type.TypeList
Type.TableRowReturns the row type of the table type.TypeType
Type.TableSchemaReturns a table containing a description of the columns (i.eTypeTable

Type Conversion and Inspection

FunctionDescriptionInputOutput
Type.FacetsReturns the facets of a type.TypeRecord
Type.IsDetermines if a value of the first type is always compatible with the second type.TypeLogical
Type.IsNullableReturns true if a type is a nullable type; otherwise, false.TypeLogical
Type.ListItemReturns an item type from a list type.TypeType
Type.NonNullableReturns the non nullable type from a type.TypeType
Type.ReplaceFacetsReplaces the facets of a type.TypeType
Type.UnionReturns the union of a list of types.ListType
BI Gorilla Blog

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