Logical.From

The function returns a logical value based on the input value. If the input value is null, the function returns null. If the input value is already a logical value, it is returned as is. Different typ...

Syntax

Logical.From(value as any) as nullable logical

About

The function returns a logical value based on the input value. If the input value is null, the function returns null. If the input value is already a logical value, it is returned as is. Different types of input values are handled as follows: - Text: The function converts text values of "true" or "false" to logical values. - Number: If the value is 0, the function returns false, otherwise true. - For any other type of input value, an error is generated.

Explanation

Transform the number 2 into a logical value using the Power Query M function MLogical.From(2). The output will be true.