Formula Operators
You use operators to perform certain operations with the formula parameters or modify the data specified by the Data Source report parameter before the data is inserted in the report. You can add operator manually by typing them in in the formula area or select them from the list of operators available in the formula editor.
There are several groups of operators in the formulas, as described in the following sections.
Arithmetic Operators
Arithmetic operators perform common arithmetic operations with numeric values. The parameters of the arithmetic expressions are handled as the decimal values. The parameters of any other data type will be converted to the decimal type.
Operator | Description and Examples |
---|---|
+ (addition) |
Adds the value of one numeric expression to another or concatenates two strings. Example:
Here, A10 and B10 are cell references. If the values in the cells are 12.85 and 2.25, the result of the expression would be 12.85 + 2.25 = 15.1. |
- (subtraction) |
Subtracts the value of one numeric expression from another. Example:
Here, A20 and B30 are cell references. If the values in the cells are 12.85 and 2.25, the result of the expression would be 12.85 - 2.25 = 10.6. |
* (multiplication) |
Multiplies the value of two expressions. Example:
Here, C10 and D10 are cell references. If the values in the cells are 2.25 and 2, the example would evaluate to 2.25 * 2 = 4.5. |
/ (division) |
Divides the values of two expressions. Example:
Here, A10 and C10 are cell references. If the values in the cells are 4.0 and 2.0, the result of the expression would be 4.0 / 2.0 = 2.0. |
% (Mod) |
Divides two numbers and returns only the remainder. Example:
Here, B15 and C15 are cell references. If the values in the cells are 15.0 and 6.0, the result of the expression would be 3.0. |
Logical Operators
The logical operators, described below, compare Boolean expressions and return a Boolean result.
Operator | Description and Examples |
---|---|
And |
Performs logical conjunction on two Boolean expressions. If both expressions evaluate to True, then the operator returns True; if at least one expression evaluates to False, And returns False. Example:
In this example, A10 and C10 are cell references. If A10 = 10 and C10 = 20, then the expression would evaluate to True. Alternatively, if A10 = -10 and C10 = 20, the expression would evaluate to False. |
Or |
Performs logical disjunction on two Boolean expressions. If either expression evaluates to True, the operation returns True; if neither expression evaluates to True, Or returns False. Example:
In this example, A10 and C10 are cell references. If A10 = 10 and C10 = 20, then the expression would evaluate to True. Alternatively, if A10 = -10 and C10 = -20, the expression would evaluate to False. |
Not |
Performs logical negation on a Boolean expression, yielding the opposite of the expression it evaluates. If the expression evaluates to True, the operator yields False; alternatively, if the expression evaluates to False, Not yields True. Example:
In this example, A10 and C10 are cell references. If A10 is larger than C10, then the expression would evaluate to False. Alternatively, if A10 is smaller than C10, the expression would evaluate to True. |
Comparison Operators
These operators, described below, compare two expressions and return a Boolean value that represents the result of the comparison.
Operator | Description and Examples |
---|---|
= |
Equality operator. Example: In this example, A10 and B10 are cell references. If the value in the A10 cell is equal to the value in B10, then the expression evaluates to True; otherwise, the expression evaluates to False. |
<> |
Inequality operator. Example:
(where A10 and C10 are the links used as a formula parameters) In this example, A10 and C10 are cell references. If the value in the C10 cell is not equal to the value in A10, then the expression evaluates to True; otherwise, the expression evaluates to False. |
< |
The less than operator. Example:
In this example, @10 and @12 are the links to cells in the current column. If the value in the @10 cell is less than the value in @12, then the expression evaluates to True; otherwise, the expression evaluates to False. |
> |
Greater than operator. Example:
In this example, A10 and C10 are cell references. If the value in the C10 cell is greater than to the value in A10, then the expression evaluates to True; otherwise, the expression evaluates to False. |
<= |
The less than or equal to operator. Example:
In this example, A10 and C10 are cell references. If the value in the C10 cell is less than or equal to the value in A10, then the expression evaluates to True; otherwise, the expression evaluates to False. |
>= |
The greater than or equal to operator. Example:
In this example, A10 and C10 are cell references. If the value in the A10 cell is greater than or equal to the value in C10, then the expression evaluates to True; otherwise, the expression evaluates to False. |
Other Operators
This group includes the following operators.
Operator | Description and Examples |
---|---|
In (a binary operator) |
This operator is used in an elementary logical expression that evaluates the search results and returns True when the parameter matches one of the elements from the set of values. Example: |
True (a binary constant) |
This operator is used as a parameter in logical expressions. Example: |
False (a binary constant) |
This operator is used as a parameter in logical expressions. Example:
|
Null (a value) |
This operator is used as a parameter in logical expressions. Example:
|