Logical.From
A value as true or false: numbers by whether they are zero, text by its words.
Group: Values, types and errors. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Logical.From(value as any) as nullable logical
| Parameter | Type | Description |
|---|---|---|
value | any | A logical, a number, or the text "true" or "false"; null gives null. |
Returns
nullable logical. 0 gives false and any other number true; the text gives what it says.
Remarks
- Text is read as
Logical.FromTextreads it: other words are an Expression.Error, an empty text null. - Other kinds of value, such as a date or a list, are a DataFormat.Error.
Examples
Zero
Logical.From(0)
false
Any other number
Logical.From(-3)
true
Text
Logical.From("false")
false