OpenBI Docs Buy

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
ParameterTypeDescription
valueanyA 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.FromText reads 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

Logical.FromText, Logical.ToText.

Last updated · OpenBI Studio 0.3.79