Arithmetic operators
Overview
Arithmetic operators combine numeric values in formulas.
When inputs have different dimensionality, arithmetic can also change the output shape.
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-align to shared dimensions*and/apply across the combined dimension set
If your output shape matters, make dimensional intent explicit (for example with ROLLUP, ROLLUP_TO, EXPAND, DROPLEVEL) before combining nodes.
Operator reference
Operator | Details | Use for | Common patterns |
|---|---|---|---|
| Sum values |
| |
| Compute deltas |
| |
| Multiply drivers |
| |
| Calculate ratios |
|
When to prefer a function
Use
RATIO('Gross Profit', 'Revenue')when you want a ratio that keeps only the shared dimensions of both inputsUse
ADDEACH('Sales', 1)when you want to add a constant to each value without relying on arithmetic shape behavior
Pitfalls & troubleshooting
Wrong shape after
+or-: check whether the inputs have different dimensionality and aligned to shared dimensionsUnexpected expansion after
*or/: check whether the result expanded across combined dimensionsNeed stricter mismatch handling: use validated functions such as
MULTIPLY(...)orDIVIDE(...)where availableSign mistakes: consider modeling cost positions as negative values and using
+consistently
Related sections
Formula basics: evaluation order, constants, and quoting rules
Dimensionality & hierarchies: functions for explicit shaping
Troubleshooting guide: wrong shape, wrong numbers, and empty output