Operators in calculated fields

When editing custom reports you can use operators in calculated fields and measures.
Operators get evaluated in the order outlined in this table.
Operator
Syntax
Description
multiply, divide
i*j/k
Arithmetic operators for numeric types only.
percent
i%j
Calculates i as a percent of j; numeric types only.
add, subtract
i+j-k
Arithmetic operators for numeric types only.
equal
i==j
Comparison operators for string, numeric, and date types.
ot equal
i!=j
Comparison operators for string, numeric, and date types.
less than
i<j
Comparison operators for numeric and date types only.
less than or equal to
i<=j
Comparison operators for numeric and date types only.
greater than
i>j
Comparison operators for numeric and date types only.
greater than or equal to
i>=j
Comparison operators for numeric and date types only.
IN set
i IN ('apples','oranges')
Sets can be of any type.
IN range
i IN(j:k)
Ranges must be numeric or date types.
NOT
NOT(i)
Boolean operators; parentheses are required for NOT.
AND
i AND j AND k
Boolean operators; parentheses are required for NOT.
OR
i OR j OR k
Boolean operators; parentheses are required for NOT.
parentheses
()
Used for grouping operators.

Related content