If you want to build more advanced KPIs or prefer using a script when calculating your KPIs, you can use the Jerry-script builder.
The logic behind Jerry-script is similar to using formulas in Excel: Select the parameters you want to measure and enter them into a formula.
Go to Insights and Reports. If you have the option in your account to enable Analytics mode please ensure that this setting is enabled.
Click Create new KPI in the menu to the right and choose Write your KPI with Jerry-script.
Give your KPI a recognizable Name, and, additionally, add one or more Tags, so it’s easier to find afterwards when it’s ready to use.
Now you’re ready to build your KPI in the editor. When you begin typing, you’ll get a drop-down where you can pick which KPIs you want to use in your formula:
The logic is the same as when you’re building formulas in Excel – we’ve predefined some KPIs you can put into your formula – and then it’s totally up to you how to put them together so that they show the exact data you want.
Below, we have made lists of some of the commonly used operators and commands:
Operators
Operators | Name | Meaning | Example |
+ | Plus | Addition | 3 + 5 = 8 |
- | Minus | Subtraction | 9 - 4 = 5 |
* | Multiply | Multiplication | 6 * 7 = 42 |
/ | Divide | Division | 10 / 4 = 2.5 |
( ) | Parentheses | Controls order of operations | 2 * (3 + 4) = 14 |
== | Equal to | Compares two values for equality | 5 == 5 → True |
!= | Not equal to | Compares two values for inequality | 5 != 3 → True |
< | Less than | Comparison | 3 < 5 → True |
<= | Less than or equal | Comparison | 3 <= 3 → True |
> | Greater than | Comparison | 7 > 2 → True |
>= | Greater than or equal | Comparison | 7 >= 7 → True |
Commands
Command | Function | Explanation | Example | Excel Equivalent |
If( | Conditional statement | Executes one action if a condition is true, and another if it’s false. | If(x > 10, "High", "Low") → returns “High” if x > 10, otherwise “Low”. | =IF() |
Sum( | Summation | Adds a list of numbers together. | Sum(10, 20, 30) → 60 | =SUM() |
Abs( | Absolute value | Returns a number’s magnitude without its sign (makes negatives positive). | Abs(-5) → 5 | =ABS() |
Round( | Rounding | Rounds a number to the nearest integer or specified decimals. | Round(3.567, 2) → 3.57 | =ROUND() |
Ceil( | Round up | Rounds up to the nearest whole number. | Ceil(3.2) → 4 | =ROUNDUP() |
Floor( | Round down | Rounds down to the nearest whole number. | Floor(3.8) → 3 | =ROUNDDOWN() |
Sqrt( | Square root | Returns the square root of a number. | Sqrt(9) → 3 | =SQRT() |
What is Jerry-script?
Anyone familiar with scripts may know that each script has its own functionality. Jerry-script is based on Adversus' functionality and is therefore named after Jerry, the digital dog, who sometimes appears in our interface. This is to prevent it from being confused or mixed up with other types of scripts, such as Python and JavaScript. Jerry loves treats and data.


