Calculations
The engine supports several types of calculations that can be classified by complexity or execution type.
Calculation Types by Complexity
| Type | Description |
|---|---|
| Formulas | Simple expressions that calculate a single member from a dimension/hierarchy |
| Calc Scripts | Complex scripts that can calculate multiple cells in a model and can be scoped to impact only a certain area of the model |
| SQL Calcs | Stored procedures written by hand in T-SQL, for work a calc script cannot express; authored by users with Relational Access, run like any other calc |
| Model Calcs | Calculations Una generates from the model definition — Retained Earnings (with CTA), Currency Conversion and the submodel calculation — driven by model settings and Account tags; read-only, run like any other calc |
See Formulas vs. Calc Scripts for a feature-by-feature comparison.
Calculation Types by Execution
| Type | Description |
|---|---|
| Dynamic | Calculation executes at query time; results are not stored in the database |
| On Demand | Calculation executes when specifically run: from the Calculations screen, from a dashboard event (e.g., on save) or from a workflow; results are stored in the database. See Running Calculations |
| Automatic | Calculation executes every time data is saved into the associated model; results are stored in the database |
Supported Combinations
| Formulas | Calc Scripts | SQL Calcs | |
|---|---|---|---|
| Dynamic | ✅ Supported | ❌ Not supported | ❌ Not supported |
| On Demand | ✅ Supported | ✅ Supported | ✅ Supported |
| Automatic | ✅ Supported | ❌ Not supported | ❌ Not supported |
Performance Considerations
Dynamic Calculations
All dynamic calculations execute for every query. Having many and/or very complex dynamic calculations will result in performance issues for all database queries.
Automatic Calculations
Automatic calculations execute every time data is saved to the database. It is imperative that these calculations are designed to only run on data that is impacted by the current save operation.