Value Functions Overview

Delve into Value Functions in Power Query M Language, useful when performing operations on values. This page provides a comprehensive list and descriptions of Value Functions available in the M Language.

Delve into Value Functions in Power Query M Language, useful when performing operations on values. This page provides a comprehensive list and descriptions of Value Functions available in the M Language.

Evaluation and Conversion

FunctionDescriptionInputOutput
Value.ExpressionReturns an abstract syntax tree (AST) that represents the value’s expression.AnyRecord
Value.FromTextCreates a strongly typed value from a textual representation.AnyAny
Value.NativeQueryEvaluates a query against a target.AnyAny
Value.OptimizeSignals Value.Expression to return the optimized expression for a value.AnyAny

Type and Metadata

FunctionDescriptionInputOutput
Value.AsReturns the value if it is compatible with the specified type.AnyAny
Value.IsDetermines whether a value is compatible with the specified type.AnyLogical
Value.MetadataReturns a record containing the input’s metadata.AnyAny
Value.RemoveMetadataStrips the input of metadata.AnyAny
Value.ReplaceMetadataReplaces the input’s metadata information.AnyAny
Value.ReplaceTypeReplaces the value’s type.AnyAny

Value Comparison

FunctionDescriptionInputOutput
Value.CompareReturns -1, 0, or 1 based on whether the first value is less than, equal to, or greater than the second.AnyNumber
Value.EqualsReturns whether two values are equal.AnyLogical
Value.NullableEqualsReturns whether two values are equal.AnyLogical

Value Operations

FunctionDescriptionInputOutput
Value.AddReturns the sum of the two values.AnyAny
Value.DivideReturns the result of dividing the first value by the second.AnyAny
Value.MultiplyReturns the product of the two values.AnyAny
Value.SubtractReturns the difference of the two values.AnyAny

Other Functions

FunctionDescriptionInputOutput
Action.WithErrorContextThis function is intended for internal use only.AnyAny
DirectQueryCapabilities.FromThis function is intended for internal use only.AnyTable
Embedded.ValueAccesses a value by name in an embedded mashup.AnyAny
Excel.ShapeTableThis function is intended for internal use only.TableAny
Graph.NodesThis function is intended for internal use only.RecordList
Progress.DataSourceProgressThis function is intended for internal use only.AnyAny
SqlExpression.SchemaFromThis function is intended for internal use only.AnyAny
SqlExpression.ToExpressionConverts the provided SQL query to M codeTextText
Value.AlternatesExpresses alternate query plans.ListAny
Value.FirewallThis function is intended for internal use only.TextAny
Value.LineageThis function is intended for internal use only.AnyAny
Value.TraitsThis function is intended for internal use only.AnyTable
Value.TypeReturns the type of the given value.AnyType
Value.VersionIdentityReturns the version identity of the value, or null if it doesn’t have a version.AnyAny
Value.VersionsReturns a navigation table containing the available versions of value.AnyTable
Value.ViewErrorThis function is intended for internal use only.RecordRecord
Value.ViewFunctionThis function is intended for internal use only.FunctionFunction
Variable.ValueThis function is intended for internal use only.TextAny
BI Gorilla Blog

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