Formulas in Direct Costs
Any numeric cell (Qty, Rate, Total, custom columns) accepts a formula. Start typing with = just like a spreadsheet. Full formula reference lives in section 07.
Quick Examples
= L5 * 2 Twice line 5's total.
= #lq10 + #lq11 Sum of line 10 and line 11 quantities.
= #labour_rate * 1.15 Project parametric × 1.15.
= IF(L3 > 1000, L3*0.9, L3) Bulk discount above $1,000.
= SUMCC("Volume") Sum of the "Volume" custom column.
Where Formulas Live
| Cell | Scope | Can reference |
|---|---|---|
| Direct Cost item Qty / Rate / Total | Global | Items (L#, #lq#, #lt#, #lr#), project parametrics, custom columns. |
| Breakdown Qty / Rate / Total | Scoped to this breakdown | Breakdown lines (L#, #lq#), scoped parametrics, project parametrics. |
| Custom column cell | Global | Same as items. |
References at a Glance
| Reference | Meaning |
|---|---|
L10 | Line 10's default value (total). |
#lq10 | Line 10 quantity. |
#lt10 | Line 10 total. |
#lr10 | Line 10 rate. |
L1:L10 | Range; sums when used bare, or iterable with SUM(L1:L10). |
#my_var | Global or scoped parametric called my_var. |
#cc.ColumnName | Custom column value on this row. |
[MY_VAR] | Alternate bracket syntax (case-insensitive). |
Typical Patterns
Quantity from a project parametric (great for area- or count-based projects):
Qty = #floor_area * 1.05 // 5% waste
Rate = ResourceRate // populated from resource
Bulk or per-unit discount:
= IF(L7 > 5000, L7 * 0.925, L7)
Cross-line sum with labels:
L20 "Sub-total labour" SUM(L10:L19)
L30 "Sub-total material" SUM(L21:L29)
L40 "Grand total" L20 + L30
Carbon-adjusted rate:
= #base_rate * (1 + #carbon_adj/100)
Evaluation Order
The engine parses your formula, tokenises, builds an AST, and evaluates it. Dependencies are tracked — if L5 changes and L7's formula references L5, L7 recalculates automatically.
Circular references are detected and rejected before the formula is saved.
Error Display
| On the cell | Meaning |
|---|---|
#ERR | Syntax error; hover for description. |
#CIRC | Circular reference. |
#NAME? | Unknown variable or function. |
#DIV/0 | Division by zero. |
Wrap risky expressions with IFERROR(expr, fallback) to handle gracefully.
Full Function Reference
70+ functions — see 07.4 Built-in Functions Reference or Appendix B (quick card) for the complete list.