Power Query
published
Search
⌃K

Logical.FromText

Logical.FromText

Creates a logical value from the text values "true" and "false".
function (optional text as nullable any) as nullable any

Description

Creates a logical value from the text value text, either "true" or "false". If text contains a different string, an exception is thrown. The text value text is case insensitive.

Category

Logical

Examples

Create a logical value from the text string "true".
Logical.FromText("true")
true
Create a logical value from the text string "a".
Logical.FromText("a")
[Expression.Error] Could not convert to a logical.