Insights - Building Calculations - Beta
A guide to building calculation formulas in Insights Data Model
Introduction
If you have set up a Data Model and want to edit it to meet your business needs, you have the option to add Sections, Lines, Calculations, and Titles (titles are informational only).
📗 Insights Setup & Data Model - Beta
Calculation lines hold formulas that can reference other Calculations, Lines, or Sections, as well as GL Accounts, Categories, Subcategories and Measures.
This article explains:
- how calculation lines work
- how the different item types add up
- how a typed formula stays in sync with the visual builder
Calculation Results
- A calculation line never holds its own numbers. Its results are calculated from other lines and figures every time the report runs, so it's always in step with the underlying data.
- Calculation lines reference other lines by ID, so they keep working if a referenced line is renamed.

How to build a Calculation
In the calculation editor, you can build calculations by using either the tags or the formula bar. You can switch between them freely as they are always kept in sync.
Item Types
Click Add Item + and select the Item Type (GL Account, GL Subcategory, GL Category, Measure, or Sections & Lines) and then the particular item. Items can be removed by clicking the X icon.
Below are the operators that you use to create formulas with the items. Click any operator tag to change it. Type a digit to multiply or divide by a fixed value. For example ‘x12’ to annualise a monthly figure (only available in the formula bar). Operators can be removed by clicking the X icon.
| Operator | Function |
| ‘+’ Add | Adds the next item to the running total. |
| ‘-’ Subtract | Subtracts the next item. |
| ‘x’ Multiply | Multiplies one value by another value or a fixed number. |
| ‘÷’ Divide | Divides one value by another value or a fixed number (used for margins and ratios). |
| () Brackets | Groups part of a formula. |

The formula bar
Instead of clicking Add Item + each time, you can type the whole formula in the formula bar. The empty bar prompts you with: “Type a formula or use $A $S $C $M $L shortcuts…”

Enter as follows:
- Operators: See Operator table above.
- Numbers: type digits to add a fixed value, for example 12.
- Items: use a shortcut such as $C to pick a category. While typing in the formula bar, these shortcuts jump straight to the right picker:
| Type | Opens |
| $A | GL Account |
| $S | GL Subcategory |
| $C | GL Category |
| $M | Measure |
| $L | Sections & Lines |
Press Enter (or click away) and the tags above updates itself automatically to match what you typed. Editing the tags updates the typed formula in the same way. The two always describe the same calculation.
Calculation Formulas and cheat sheet
Calculation Formula Types
A single calculation line takes one of two shapes:
- An Add / Subtract chain: any number of items combined with + and -. Example: Revenue - Cost of Sales - Operating Costs
-
A single multiply or divide: exactly two values: one value x or ÷ another value (or a number). Example: Gross Profit ÷ Revenue
Combining Formula Types
Need both at once? Use a formula like (A - B) / C
Formula Cheat Sheet
| Calculation | How to build it |
| Gross Profit | Revenue - Cost of Sales |
| Operating Profit | Gross Profit - Operating Costs |
| Annual run-rate | Subscription Revenue x 12 |
| Gross Margin % | Gross Profit / Revenue (set the line's format to Percent in the Format dropdown for the calculation) |
How Item Types impact a Calculation
How are Item Type totals calculated?
When you click Add Item +, you need to select an item type. Each Item Type pulls numbers from a different place and totals them in a particular way.

| Item Type | Source | Total calculation | Notes |
|---|---|---|---|
| GL Account | Chart of Accounts | Single GL account figure. | Includes a specific GL Account in a calculation rather than all accounts in a Category or Subcategory. |
| GL Category | Chart of Accounts | Totals all GL Accounts coded to the GL Category, across all GL Subcategories. |
|
| GL Subcategory | Chart of Accounts | Totals all GL Accounts coded to a single GL subcategory. | |
| Section | Insights | Totals the lines in a Section. |
|
| Line | Insights | Individual line that totals all GL accounts mapped to it. | Includes the Subcategories and GL Accounts assigned to the selected line in the calculation. |
| Measure | Insights | A ready-made financial measure (KPI) that contributes a single value, for example Gross Profit or EBITDA. | See section ‘Measures’. |
Measures
A measure is a ready-made financial calculation (KPI) that that already knows how to find its own numbers from your report structure. Measures carry the correct sign conventions and adapt to your model, so renaming a section won't break them.
Fixed vs Custom Measures
There are two kinds of measures:
-
Fixed Measures (built in): Total Revenue, Total Cost of Sales, Gross Profit, Gross Margin %, Operating Profit, Operating Margin %, EBITDA, EBITDA Margin %, EBIT, Net Profit, Net Margin %, Total Operating Cost, Effective Tax Rate, and Interest Cover.

Fixed Measure Prerequisites
Some measures depend on others, for example, the margin needs its profit measure to exist first. If a prerequisite is missing, the measure is greyed out with a note telling you what needs to be set up first.
-
Custom Measures: any calculation line you have already built can be reused inside another formula (shortcut $M). Edit it once and every formula that uses it updates automatically.
EBITDA Prerequisite: Tag Subcategories in AIQ
EBITDA, EBIT, Effective Tax Rate and Interest Cover rely on the EBITDA Reporting Type field on each GL Subcategory in AccountsIQ.
Check that every depreciation, amortisation, interest and tax subcategory is tagged, otherwise EBITDA may be wrong. Insights flags untagged subcategories as an unresolved (amber) item.
To set the field: in AccountsIQ, open the GL Subcategory, select the EBITDA Reporting Type (None, Depreciation, Amortisation, Interest Expense, Interest Income, or Tax), and save. From an unresolved item, Tag in AIQ opens the right subcategory for you. When you open Insights, this update will sync automatically.
Calculation Line Warnings and Errors
The formula builder stops you making calculations that won't work and flags ones that have gone stale.
| Error Type | Logic | Error Message | Solution |
|---|---|---|---|
| Circular reference | You can't reference a line that depends (directly or indirectly) on the one you are editing. | Options that would produce circular references are disabled with a note such as ‘would create a circular reference: A > B > C > A’. | Reformulate the calculation to select only available options. |
| Broken reference | A line your formula used has been deleted. | The calculation line shows a warning triangle. “This line has been deleted and is no longer part of the model”. | Replace or remove the reference. |
| Measure not ready | A measure is greyed out because a prerequisite is missing. | Inputs can't be found. ‘Missing prerequisite(s)’ | Add the required prerequisite. |
| ‘Cannot resolve’ |