Iif(Condition: Variant,
TruePart: Variant,
FalsePart: Variant)
Condition. Condition to be calculated
TruePart. It is returned if the Condition value is True
FalsePart. It is returned if the Condition value is False.
It provides conditional formatting of statements.
The Iif method is equivalent to the three-place operator ?: dialog box opens.
Difference of the Iif method from the three-place ? operator:
Iif(Condition, TruePart, FalsePart)
Iif calculates values of Condition, TruePart, FalsePart first, and then, depending on the result of Condition, returns the TruePart or FalsePart value
Condition ? TruePart : FalsePart
Three-place operator ? it calculates the Condition value first and then, depending on the result, it calculates either TruePart, or FalsePart.
Formula | Result | Application |
= Iif(Min({Brazil|BCA},{Peru|BCA})>0, True, False) | True Because minimum value of corresponding observations of the Brazil|BCA and Peru|BCA series is greater than 0. |
It can be used in formulas of calculated series of time series database and in formulas of attribute-based models of modeling container. |
= Iif(Min(X1)>0, True, False) | False Because minimum value of the X1 factor points is less than 0. |
It can be used in model variable-based formulas of modeling container. |
See also:
Functions Available in Expression Editor │ Logical Functions │ IModelling.Iif