Arithmetic operators
Overview
Arithmetic operators combine numeric values in formulas to produce calculated results. They are used for everything from simple KPI math to combining driver nodes, and they can be used inside functions the same way as any other expression.
Start here if…
You want to add, subtract, multiply, or divide node values.
You’re building KPIs from drivers.
You need to understand why combining two nodes changes the result’s shape (aggregation vs expansion).
What you’ll find on this page
A compact reference of the four arithmetic operators (
+,-,*,/).How arithmetic behaves when inputs have different dimensionality (alignment vs expansion).
Practical patterns and common pitfalls.
Mental model
Arithmetic operators work row-wise on a specific combination of level values.
When inputs don’t share the same dimensionality, the operator can change the output shape:
+and-keep only shared dimensions (often behaving like an implicit rollup to the common shape).*and/apply across the combined dimension set (often expanding).
If your output shape matters, make dimensional intent explicit (for example with ROLLUP, ROLLUP_TO, EXPAND, DROPLEVEL) before combining nodes.
Operator reference
Operator | Details | Common patterns |
|---|---|---|
| Sum values (e.g. | |
| Compute deltas (e.g. | |
| Driver logic (e.g. | |
| Ratios and rates (e.g. |
Prefer RATIO for shared-shape ratios
Use RATIO('Gross Profit', 'Revenue') when you want the result to keep only the shared dimensions of both inputs (no expansion).
Prefer ADDEACH for element-wise constants
Use ADDEACH('Sales', 1) when you want to add a constant to each cell before rollups (element-wise adjustment), instead of relying on 'Sales' + 1 when shape and aggregation matter.
Pitfalls & troubleshooting
Wrong shape after combining nodes: If adding or subtracting suddenly aggregates, check whether the inputs have different shapes and whether
+and-aligned to shared dimensions.Unexpected expansion: If multiplication or division suddenly explodes the result size, check whether
*and/expanded across combined dimensions.Need explicit mismatch feedback: When debugging shape mismatches, use validated functions where available (for example
MULTIPLY(...)/DIVIDE(...)) to surface detailed mismatch errors.Advice: Model cost positions as negative values and use
+consistently to avoid sign mistakes.
Related sections
Operators navigation to arithmetic vs comparisons/boolean logic.
Formula basics evaluation order, parentheses, constants, and quoting rules.
Math & numeric row-wise helpers like
MIN/MAX, rounding, logs, etc.Dimensionality & hierarchies explicit shaping (
ROLLUP,ROLLUP_TO,EXPAND,DROPLEVEL).Troubleshooting guide diagnose wrong shape vs wrong numbers vs empty output.