Skip to main content

Calculations

The engine supports several types of calculations that can be classified by complexity or execution type.

Calculation Types by Complexity​

TypeDescription
FormulasSimple expressions that calculate a single member from a dimension/hierarchy
Calc ScriptsComplex scripts that can calculate multiple cells in a model and can be scoped to impact only a certain area of the model
SQL CalcsStored 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 CalcsCalculations 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​

TypeDescription
DynamicCalculation executes at query time; results are not stored in the database
On DemandCalculation 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
AutomaticCalculation executes every time data is saved into the associated model; results are stored in the database

Supported Combinations​

FormulasCalc ScriptsSQL 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.