Apply logical functions to test conditions and return TRUE or FALSE results. These functions are commonly used to evaluate expressions, validate data, and build conditional logic in reports.
In this category#
| Function | Description | SYNTAX | EXPLANATION | EXAMPLE |
|---|
| AND | Returns TRUE only if all conditions are TRUE. | | | |
| OR | Returns TRUE if any condition is TRUE; returns FALSE only if all conditions are FALSE. | OR( logical_test1, [logical_test2], ... ) | Will return 25 if the region is West or East otherwise returns 30 | IF(OR(Region == "West", Region =="East"), 25, 30) |
| NOT | Returns the opposite logical value of the argument. | NOT( logical_test ) | Will return 50 if the region is not West otherwise returns 25 | IF(NOT(Region == "West"), 50, 25) |
| XOR | Returns TRUE if the number of satisfied conditions is odd, and FALSE if it is even. | XOR( logical_test1, [logical_test2], ... ) | Will return 25 for all category in the West except for category Urban, and returns 25 for all Urban category under all region except for west, for all other items returns 30 | IF(XOR(Region == "West", Category=="Urban"), 25, 30) |
| IN | Returns TRUE if the specified value exists in a list or array. | | | |
| ISBLANK | Returns TRUE if the specified value is blank or empty. | ISBLANK(value) | Returns TRUE if AC is empty | ISBLANK(AC) |
| ISEMPTY | Returns TRUE if the specified value is blank or empty. It works similar to ISBLANK. | ISEMPTY(value) | Returns TRUE if AC has no value | ISEMPTY(AC) |
| ISNUMBER | Returns TRUE if the specified value is a valid number. | ISNUMBER(value) | Returns AC-PY/PY if the value is a number else returns 0 | IF(ISNUMBER((AC-PY)/PY), (AC-PY)/PY , 0) |
| ISREFEXIST | Returns TRUE if the specified reference exists in the model. | | | |
Logical Operators#
| TITLE | OPERATORS | DESCRIPTION |
|---|
| AND | && | Logical AND |
| OR | || | Logical OR |
| XOR | ^ | Logical Exclusive OR |