Using calculations

Configuring Calculations

Calculations are a type of Entity Attribute used to compute new values based on existing record data. Configured as an Entity Attribute of type Calculation, they enable powerful operations to derive meaningful insights from your data.

Writing a Calculation

Calculations can perform a wide variety of operations, grouped into the following categories:

Logical Operators

Mathematical Aggregations

Statistical Calculations

Text Functions

Record Lookup

Symbols and Their Usage

Symbol Usage
+ Addition
- Subtraction
* Multiplication
/ Division
% Percent
^ Exponential operator
= Equal to
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
<> Not equal to
? Wildcard operator: Matches a single value
~ Negates wildcard operators to ensure a literal match
# Denotes the beginning of an entity attribute
{ } Denotes an array
[ ] Encloses entity or attribute names
. Accesses a linked entity attribute, e.g., #[Entity].[Attribute]
( ) Groups expressions or denotes function arguments
, Separates arguments in functions

Referencing Entity Attributes

To use data from an entity in a calculation, reference its attributes using the # symbol with the attribute name in square brackets:

Example

Attribute Name Attribute Type Attribute Value
Impact Rating Number 25
Likelihood Rating Number 10

Calculation Examples

  • Sum: SUM(#[Impact Rating], #[Likelihood Rating])35
  • Product: #[Impact Rating] * #[Likelihood Rating]250

Referencing Linked Entity Attributes

To reference attributes from linked entities, prefix the attribute with the linked entity name and a dot:

Example

Entity Name Attribute Name Attribute Type Attribute Value
Assessment Impact Rating Number 25
Likelihood Rating Number 10
Risk Score Number 250
Vendor Name Text SureCloud
Tier Number 2
  • Combined Entity Calculation: #[Tier] * (#[Assessment].[Impact Rating] * #[Assessment].[Likelihood Rating])500
  • Count Linked Records: COUNT(#[Assessment].[Risk Score])

Referencing Option List Items

When using option list attributes in calculations, you can reference values in two ways: a basic string literal or the preferred linked option reference.

String Literal Reference (Basic Method)

Compares the attribute directly to a string that matches the option value:

IF(#[Risk Level] = "High", true, false)

This works, but it's sensitive to typos and formatting. If the option list value changes, your calculation may break.

Linked Option Reference (Preferred Method)

A more robust and maintainable method, referencing the exact option list value by path:

IF(#[Risk Level] = #[Option].[Risk Level].[High], true, false)

Where you use #[Option].[<optionListName>].[<optionListValue>]

This approach ensures the reference remains valid even if the display text for the option changes.

Was this article helpful?
0 out of 0 found this helpful