OpenBI Docs Buy

TRUE

Boolean true, as TRUE() writes it.

Group: Logical. Compatible with DAX.

Syntax

TRUE ( )

It takes no parameters.

Returns

Boolean. TRUE.

Remarks

  • TRUE without the brackets means the same.
  • In arithmetic TRUE is 1, so TRUE () + 1 is 2.
  • A logical value is not compared with a number: TRUE () = 1 is an error.
  • Its most common use is the first argument of SWITCH, to test conditions in turn.

Examples

Two ways to write it, and as a number

EVALUATE
ROW ( "TRUE ()", TRUE (), "TRUE", TRUE, "Plus 1", TRUE () + 1 )
TRUE ()TRUEPlus 1
TRUETRUE2

The first condition that holds

EVALUATE
ROW ( "Band", SWITCH ( TRUE (), 5 > 10, "big", 5 > 3, "medium", "small" ) )
Band
medium

FALSE, SWITCH, IF, AND.

Last updated · OpenBI Studio 0.3.74