For Text attributes, you can use the following operators:
Operator | Description | Example |
+ | Adds | ="Two " + "Strings" --> Two Strings |
& | Adds | ="Two " & "Strings" --> Two Strings |
substring() | Generates a substring | =substring("ABCDEFG", "2") --> CDEFG =substring("ABCDEFG", "2", "5") --> CDE =substring("ABCDEFG", "BC") --> DEFG =substring("ABCDEFG", "BC", "F") --> DE |
text | Converts a list into a text | =text('mymatrix(A1:A3)') --> first cell, second cell, third cell |
regexp() | Implements Jakarta Regexp getParen(0) | =regexp("ABCDEFG","A.*D") --> ABCD |
match() | Implements Jakarta Regexp match | =match("ABCEFG",".B.*") --> 1 |
equals | Equals | =equals("ABCDEFG","ABCDEFG") -->1 |
compare | Compares | =compare("A","A") --> 0 =compare("A","B") --> -1 =compare("B","A") --> 1 |
For Integer, Float, Date attributes, and Matrix attribute cells, you can use the following operators:
Operator | Description | Example |
+ | Addition | 3+1 |
- | Subtraction | 3-1 |
* (asterisk) | Multiplication | 3*3 |
/ (forward slash) | Division | 3/3 |
** or ^ | Exponentiation | 3^3 |
sqrt(), cubert() | Square/Cubic root | sqrt(12) |
sin(), cos(), cot(), tan(), arcsin(), arccos(),arctan(), csc(), sec() | Trigonometric functions | sin(1) |
() | Parentheses | (1-2)*3 |
(a>b)?c:d | Boolean expression Note: Boolean expressions have lower priority
than Addition, Subtraction, Multiplication, and Division.
|
(3<4)?1:0 |
max(a,b), min(a,b) | Maximum and minimum | max(1,2) |
abs(), ceiling(), floor(), trunc(), round() | Various math functions | trunc(3.14) |
n! | Factorial operator | 3! |
exp(), ln(), log2(), log10() | Exponential functions | ln(1) |
Sum | Sum of the parameters | =Sum('cost1','cost2','cost3') = cost1 + cost2 + cost3 =Sum('MMM(A1:C1)') = cell A1 + cell B1 + cell C1 in the MMM matrix |
Factor | Product sum of the parameters | =Factor('cost1','cost2','cost3') = cost1 * cost2 * cost3 =Factor('MMM(A1:C1)') = cell A1 * cell B1 * cell C1 in the MMM matrix |
Average | Average of the parameters | =Average(12,14,22) = 16 |
Max | Highest parameter value | =Max(12,14,22) = 22 |
Min | Lowest parameter value | =Min(12,14,22) = 12 |
NPV | Net Present Value. | =NPV('Opportunity Cost of Capital','CF today', 'CF Year 1',CF Year 2',CF Year 3','CF Year 4') |
substring | Returns a subset of a string | =substring(text, startIndex/String, [endIndex/String]) startIndex is inclusive, startString is exclusive endIndex and endString are exclusive A B C D E F G 0 1 2 3 4 5 6 =substring("ABCDEFG", "2") --> CDEFG =substring("ABCDEFG", "2", "5") --> CDE =substring("ABCDEFG", "BC") --> DEFG =substring("ABCDEFG", "BC", "F") --> DE |
text | Converts a list of references into a text string by separating their values with "," or " ". | =text('mymatrix(A1:A3)') = first cell, second cell, third cell |
round | Rounds the value of the parameter | =round(100*7.23456)/100 will result in 7.23 in a Float attribute |
today | Calculates the current date. Note: This operator is only useful
in date attributes.
|
=today() in a date attribute displays the current date. To update the expression daily, use the parameter run_at. For example, enter =today("run_at=2") to update the expression every day at 2 am, server time. |
For Time Grid attribute cells, you can use the following operators:
Operator | Description | Example |
+ | Addition | 3+1 |
- | Subtraction | 3-1 |
* (asterisk) | Multiplication | 3*3 |
/ (forward slash) | Division | 3/3 |
** or ^ | Exponentiation | 3^3 |
average | Average of the cell values | =average('A1','B2','C2') = 16 |
count | Number of cells | = count('A1','B2','C2') =3 |
max | Highest cell value | =max('A1':'A3')=10 |
min | Lowest cell value | =min('A1':'A3')=2 |
sum | Product sum of the cell values | =sum('A1':'A3')=15 |