TRUE
Boolean true, as TRUE() writes it.
Group: Logical. Compatible with DAX.
Syntax
TRUE ( )
It takes no parameters.
Returns
Boolean. TRUE.
Remarks
TRUEwithout the brackets means the same.- In arithmetic TRUE is 1, so
TRUE () + 1is 2. - A logical value is not compared with a number:
TRUE () = 1is 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 () | TRUE | Plus 1 |
|---|---|---|
| TRUE | TRUE | 2 |
The first condition that holds
EVALUATE
ROW ( "Band", SWITCH ( TRUE (), 5 > 10, "big", 5 > 3, "medium", "small" ) )
| Band |
|---|
| medium |