Logical.ToText Function in Power Query
The Logical.ToText function returns a text value from a logical value, either true or false. If logicalValue is not a logical value, an exception is thrown.
Note: The logical value is true or false in small case. The True/False/TRUE/FALSE are not logical values.
Syntax
Logical.ToText(logicalValue as nullable logical) as nullable text
Example: Create a text value from the logical value.
Power Query M
let Source = Logical.ToText(false) in Source
The output of the above code is “false”.
We can check that the function is successfully converted logical value to text, by using the Text.Length function, which returns the length of the text.
Power Query M
let Source = Text.Length(Logical.ToText(false)) in Source
The output of the above code is 5.