This topic lists the operators that can be used to create calculated fields and measures in Ad Hoc Views. Operators are evaluated in the order they are shown in the table.
Operator |
Syntax |
Description |
Multiply, Divide |
i * j / k |
Arithmetic operators for numeric types only. |
Percent |
i % j |
Calculates i as a perfect of j; numeric types only. |
Add, Subtract |
i + j - k |
Arithmetic operators for numeric types only. |
Equal Not Equal |
i == j i != j |
Comparison operators for string, numeric, and date types. |
Less than |
i < j |
Comparison operators for numeric and date types. |
Less than or equal |
i <= j |
Comparison operators for numeric and date types. |
Greater than |
i > j |
Comparison operators for numeric and date types. |
Greater than or equal |
i >= j |
Comparison operators for numeric and date types. |
IN set |
i IN ('apples','oranges') |
Sets can be of any data type. |
IN range |
i IN (j:k) |
Ranges must be numeric or date types. |
NOT |
NOT ( i ) |
Boolean operator; parentheses are required. |
AND |
i AND j AND k |
Boolean operator |
OR |
i OR j OR k |
Boolean operator |
parentheses |
( ) |
Used for grouping. |