Value.Type is a Power Query M function that retrieves the type of a given input value. The function returns the type of the input value.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
Value.Type( value as any ) as type
Description
Returns the type of the given value.
Examples
To test the type of a value, you use the Value.Type function.
Value.Type( "abc" ) // Returns type text
Value.Type( 2024 ) // Returns type number
Value.Type( #time(9,30,0) ) // Returns type time
Value.Type( { 1, "a", true } ) // Returns type list
Besides returning common type values like number or text, remember that a (data) type also has a type. The following expression returns type type
for the ‘type text’.
Value.Type( type text ) // Returns type type
Related functions
Other functions related to Value.Type are:
- Value.Alternates
- Value.Expression
- Value.Lineage
- Value.ResourceExpression
- Value.Traits
- Value.VersionIdentity
- Value.Versions
