Value.Is
Whether a value is of a type: number, text, date, list, table and the others.
Group: Values, types and errors. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Value.Is(value as any, type as type) as logical
| Parameter | Type | Description |
|---|---|---|
value | any | The value to test. |
type | type | The type, such as type number or type nullable text. |
Returns
logical. true when the value is of the type.
Remarks
- Only the kind of value counts. Int64.Type, Currency.Type and Percentage.Type are all numbers, so 1.5 is an Int64.Type as far as this test goes.
- null passes only for a nullable type, such as
type nullable number. - The
isoperator does the same:x is number.
Examples
Text that looks like a date is text
Value.Is("2026-01-01", type date)
false
null and a nullable type
Value.Is(null, type nullable number)
true
A fraction passes as Int64.Type
Value.Is(1.5, Int64.Type)
true