Formula operators
The following table summarizes the available formula operators. They are listed in high to low precedence order. The precedence order is the sequence in which they are evaluated when included in a formula.
Operator |
Category |
No. Arguments Allowed |
Description |
Example |
---|---|---|---|---|
! (exclamation point) |
Comparison, Logical |
1 |
Unary logical NOT |
|
– (minus sign) |
Arithmetic |
1 |
Unary minus (negative number literal) |
–1 |
* (asterisk) |
Arithmetic |
2 |
Product (multiply) |
2*2 |
/ (forward slash) |
Arithmetic |
2 |
Division |
2/2 |
+ (plus sign) |
Arithmetic |
2 |
Addition |
2+2 |
– (minus sign) |
Arithmetic |
2 |
Subtraction |
2–2 |
& (ampersand) |
Concatenation |
2 |
Joins two text values to produce one continuous text value. It can also combine attributes and append List values. |
“Sales”&”force” attribute("BOLD", true) & attribute("FORECOLOR", green) {1, 2, 3} & {4, 5, 6} |
<= |
Comparison |
2 |
Less than or equal to |
[Sales2020]<=[Sales2021] |
< |
Comparison |
2 |
Less than |
[Sales2020]<[Sales2021] |
> |
Comparison |
2 |
Greater than |
[Sales2020]>[Sales2021] |
= |
Comparison |
2 |
Equal to |
[Sales2020]=[Sales2021] |
<> |
Comparison |
2 |
Not equal to |
[Sales2020]<>[Sales2021] |
&& |
Concatenation, Logical |
2 |
Logical AND, indicates whether both operands are true |
IF [Customer]=”Jones” && [City]=”New York” |
|| |
Concatenation, Logical |
2 |
Logical OR, indicates whether either operand is true |
IF [Customer]=”Jones” || [City]=”New York” |