Skip to main content
Skip table of contents

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

+

ADDITION (+)

Sum values (e.g. 'Revenue' + 'Other income')

-

SUBTRACTION (-)

Compute deltas (e.g. 'Revenue' - 'COGS')

*

MULTIPLICATION (*)

Driver logic (e.g. 'Price' * 'Volume')

/

DIVISION (/)

Ratios and rates (e.g. 'Profit' / 'Revenue')

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

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.