Checked as you type
Type field names in brackets. QuackUI says what the formula will produce, such as Measure · Number, or exactly which character is wrong. You can’t add one that doesn’t check.
Two kinds
A measure calculation combines aggregated values. Margin % divides total margin by total net sales at whatever level the block shows, so its total is the true ratio.
([Net amount] - [Cost amount]) / [Net amount]A dimension calculation works row by row, and you can group and filter by it.
if([List price] >= 100, "Premium", "Standard")Division by zero gives an empty value. Nothing in a formula reaches DuckDB as SQL: it is parsed, type checked and rebuilt by QuackUI, and text is bound as a parameter.
Where they live
Admins add calculations to the model, where everyone who can use the model sees them and they are versioned with it. Report editors add their own to a report. Both appear in the Fields pane and work anywhere a field does: columns, axes, filters, prompts, sorts, alerts and exports.
Deleting one that is in use is refused, with a list of where.
Read more: calculations, formula reference.

![A calculation naming a missing field: No field [Nope] in this model (at character 12)](/quackui/_astro/calculation-error.CfWcBTS5_hM2ox.webp)