Iif
Logic & variables
Iif(cond, then, else)
The simple if/else (compiles to SQL CASE WHEN). Both branches must share one type (SQX006).
When to use it
Section titled “When to use it”- Quick two-way flags on measure values — target hit?, positive or negative? For three or more branches, use
Case.
Example
Section titled “Example”RevenueOrZero := Iif([Revenue] > 0, [Revenue], 0)