The Calculate tool lets you add custom calculations to your tables, helping you create totals, proportions, variances, and other derived values directly within an Insight.
This allows you to explore and interpret data more clearly without needing to export it elsewhere.
Creating a Calculation
- Click Calculate
- The Calculator will open in the left-hand sidebar
- Enter your formula by:
- Clicking the calculator buttons with your mouse, OR
- Clicking into the formula field and typing using your keyboard
- Reference rows from your table if needed
- Click the row number shown to the left of a table row to insert it into the formular, OR
- Enter it manually using the format
Row#(for example,Row12).
- Click = to run the calculation and add it to the table.
Once added, the calculation becomes part of your table and updates automatically with the data.
Editing a Calculation
-
Click the dropdown arrow next to the calculation row.
-
Select Edit calculation.
-
The calculator opens with the existing formula pre-filled.
-
Update the formula as needed.
-
Click = to apply the changes.
Renaming a Calculation
Clear names help others understand what the calculation represents at a glance. To rename your calculation:
-
Click the dropdown arrow next to the calculation row.
-
Select Rename.
-
Edit the name directly, then click away from the field to save.
Deleting a calculation
-
Click the dropdown arrow next to the calculation row.
-
Select Delete.
The calculation will be removed from the table.
Formatting calculations
Calculations can be displayed as either:
-
Decimal values, or
-
Percentages
Use the 0.0 button to format the value as a decimal (default), or the % button to format it as a percentage.
Validation and error checking
As you build a calculation, the tool checks the formula in real time:
-
A green check mark indicates the formula is valid.
-
A red cross indicates an error that needs to be corrected.
You’ll need to fix any errors before you can finalise the calculation.
Supported math operations
The Calculate tool supports common mathematical operations, including:
Standard arithmetic
-
Addition, subtraction, multiplication, and division
-
Example:
1 + 2 - 3 / 4 * 5
Powers
-
Example:
5 ^ 2
Parentheses
-
Example:
(1 + 5) / 2
These operations can be combined to create more complex expressions.
Using advanced Calculator functions
Calculations support a wide range of mathematical functions for more advanced use cases, such as statistical or probability calculations.
For example, to find the maximum value in a set of numbers and add 7:
max(1, 3, 2) + 7
This returns 10, as 3 is the highest value in the set.
You can explore the full range of supported functions in the Math.js documentation:
Read more about Math.js expression syntax here https://mathjs.org/docs/expressions/syntax.html
Important limitations
When using advanced functions, note that:
-
Only functions that return a single numeric value are supported.
-
Functions that return other types (such as matrices, text, or boolean values) aren’t supported and won’t work correctly.