Skip to main content

Formulas in Aire Labs

Formulas are expressions that compute the value of a term from other terms, constants, and built-in functions. They support standard arithmetic, arrays, units, financial calculations, and time-series logic.

Writing Formulas

Basic Syntax

Operators

Comparison and logical operators return 1 (true) or 0 (false).

Referencing Other Terms

Refer to other terms by their name. Aire Labs resolves references from right to left — you can use a term’s full name or any unique suffix:
All three resolve to the same term as long as the suffix is unambiguous. If a suffix matches more than one term, the formula will show an #ambiguous error. Use a longer suffix to disambiguate.

Constants


Built-in Functions

These functions use lowercase names — this is intentional and reflects the underlying API convention.
See Units for all supported unit strings.

The Formula Editor

The formula editor is where you write and edit formulas for any calculated term. It’s available throughout Aire — open it from the term detail panel, from any block view, or directly from a cell in All Blocks. Grid Mode adds one particularly useful entry point: clicking a calculated term opens the editor inline without navigating away from your model, so you can edit formulas while keeping your place in the spreadsheet. See All Blocks for the full layout options.

Authoring

  • Enter to insert — Pressing Enter on any value or formula line inserts a new line directly below.
  • Line numbers — Line numbers are visible in the editor for easier navigation in longer formulas.
  • Inline computed values — Computed values display inline next to the formula that produced them.
  • Human-readable display names — Formulas show display names for referenced terms; hover to reveal the underlying identifier.

Formula History

Every formula has a full version history accessible inside the editor. Select the History tab to see exactly how the expression has changed over time, who made each change, and when.