Overview
An operator is used to specify the type of calculation to be performed on the elements in a formula. You can use the default calculation order or change the order using parentheses.
Operator Type
Four types of calculation operators are available: arithmetic operator, comparison operator, logical operator, and string concatenation operator.
Arithmetic Operator
You can use the following arithmetic operators in formulas to perform basic mathematical operations such as addition, subtraction, multiplication, and division.
Arithmetic Operator | Example | Result |
---|---|---|
+ (addition operator) | = 3 + 3 | 6 |
– (subtraction operator/unary minus operator) | = 3 – 1 | 2 |
* (multiplication operator) | = 3 * 3 | 9 |
/ (division operator) | = 15/3 | 5 |
% (remainder operator) | = 20 % 6 | 2 |
^ (exponentiation operator) | = 3 ^ 2 | 9 |
Comparison Operator
You can use the following operators to compare two values. When you use these operators to compare two values, the result is a logical value: TRUE or FALSE.
Comparison Operator | Definition | Example |
---|---|---|
= (equality operator) | Equal to | A1 = B1 |
> (greater than operator) | Greater than | A1 > B1 |
< (less than operator) | Less than | A1 < B1 |
> = (greater than or equal operator) | Greater than or equal to | A1 > = B1 |
< = (less than or equal operator) | Less than or equal to | A1 < = B1 |
!= (inequality operator) ![]() | Not equal to | A1 != B1 |
Logical Operator
The usage of logical operators is the same as that of the AND and OR functions.
Logical Operator | Definition | Example |
---|---|---|
&& | Logical AND, which returns true if both expressions are true. | Sales > = 10 && Number of salespeople > = 2 |
|| | Logical OR, which returns true if one of the expressions is true. | Sales > = 10 || Number of salespeople > = 2 |

String Concatenation Operator
You can use the + operator to concatenate text fields.
For example, you can use the CONCATENATE function to concatenate the text fields Store Style and Store Name. You can also simply use the + operator, as shown in the following figure.
Formula Calculation Order
In some cases, the calculation order may affect the returned value of a formula. Therefore, you need to know how to determine the order and how to change the order to obtain the desired result.
Operator Precedence
If a formula contains multiple operators, the calculation will be performed according to the operator precedence (shown in the following table) in FineBI. If multiple operators in a formula have same level of precedence (for example, a formula contains both a multiplication operator and a division operator), the calculation will be performed according to the following associativity in FineBI.
Precedence | Operator | Definition | Usage | Associativity |
1 | – | Unary minus operator | –Expression | Right to left |
2 | ^ | Exponentiation operator | Expression ^ Expression | Left to right |
3 | * | Multiplication operator | Expression * Expression | |
/ | Division operator | Expression/Expression | ||
% | Remainder operator | Expression % Expression | ||
4 | + | Addition operator | Expression + Expression | |
– | Subtraction operator | Expression – Expression | ||
5 | > | Greater than operator | Expression > Expression | |
< | Less than operator | Expression < Expression | ||
> = | Greater than or equal operator | Expression > = Expression | ||
< = | Less than or equal operator | Expression < = Expression | ||
6 | =, == | Equality operator | Expression = Expression Expression == Expression | |
!= | Inequality operator | Expression != Expression | ||
7 | && | Logical AND | Expression && Expression | |
8 | || | Logical OR | Expression || Expression |
Calculation with Parentheses
To change the calculation order, you need to enclose the part that needs to be calculated first in parentheses.
For example, the result of the following formula is 11, because multiplication is calculated before addition. The formula first multiplies 2 by 3, and then adds 1 and 4 to the result.
= 1 + 2 * 3 + 4
However, if you use parentheses to modify the syntax as follows, 1 and 2 will be added together first, and the result (3) will be multiplied by 3. Finally, 4 will be added to the product to get 13.
= (1 + 2) * 3 + 4