Expression.Constant

This function retrieves the M source code representation of a fixed value.

Syntax

Expression.Constant(value as any) as text

About

This function retrieves the M source code representation of a fixed value.

Explanation

Retrieve the M language code representation of a numeric value. Usage: In Power Query M, use the following expression: Expression.Constant(123) Output: "123" Retrieve the M language code representation of a date value. Usage: In Power Query M, use the following expression: Expression.Constant(#date(2035, 01, 02)) Output: "#date(2035, 1, 2)" Retrieve the M language code representation of a text value. Usage: In Power Query M, use the following expression: Expression.Constant("abc") Output: """abc"""