Value.Type
The type of a value: type number, type text, a table's type with its columns, and so on.
Group: Values, types and errors. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Value.Type(value as any) as type
| Parameter | Type | Description |
|---|---|---|
value | any | The value whose type you want. |
Returns
type. A type value, such as type text, that M can test and compare.
Remarks
- A table's type lists its columns with their types; a step that sets column types shows them here.
- A number's type is type number whichever From function made it: Int64.Type and the other number types belong to columns, not to single values.
Examples
Text
Value.Type("Chair")
type text
A table
Value.Type(#table({"Product", "Price"}, {{"Chair", 50}}))
type table [Product = any, Price = any]
A whole number is a number
Value.Type(Int64.From(42))
type number