Formulas

A formula is the only place arithmetic is written. It reads tables, drivers, and parameters.

What a formula reads

A formula says how one driver's value is computed over one phase. It is the only place a model writes arithmetic. A formula reads four things: a table's rows through an aggregation function, a key-bound table's value at the current slice, another driver, and a scalar parameter.

SUM(invoices.amount)              aggregation over the rows on this step
scenario.growth                   one value of a key-bound table
Revenue / Invoices                two drivers at the same step
Revenue * (1 - @Discount)         a driver and a scalar parameter

Filters

An aggregation can filter the rows it reads. Text appears in a formula only as a filter value, and no formula produces text, so no cell ever holds any.

SUM(invoices.amount, plan="pro")

A comparison gives the number 1 or 0. A formula that needs a condition multiplies by the comparison rather than branching on it.

Checked before it runs

Calcbird checks every formula against the project's catalog before it reads any data. A problem is reported with the span of text to underline and a message in plain language. It does not cancel the run: the cells that formula would have produced hold errors, and every other driver computes.