User Guide
07.8 · Formula Engine

Custom Column Aggregates

Custom columns (section 04.8) carry extra data per row. The *CC family of functions aggregates those values in formulas.

The Functions

FunctionReturns
SUMCC("ColumnName")Sum of all values in the column across every row.
SUMCC("ColumnName", start, end)Sum over a line range.
COUNTCC("ColumnName")Count of rows with a value.
AVGCC("ColumnName")Average.
MINCC("ColumnName")Minimum.
MAXCC("ColumnName")Maximum.
SUMIFCC("ColumnName", "MatchValue")Sum where the column equals the match value.
COUNTIFCC("ColumnName", "MatchValue")Count where the column equals the match value.
AVGIFCC("ColumnName", "MatchValue")Average where the column equals the match value.

Same-Row Reference

To refer to the current row's custom column, use #cc.ColumnName (not the *CC functions).

= Qty * #cc.UnitWeight

Worked Examples

Total area across every row:

= SUMCC("Area")

Average price in a bounded range:

= AVGCC("UnitPrice", 10, 30)

Count of items flagged as "At Risk":

= COUNTIFCC("RiskLevel", "At Risk")

Total weight of only "Steel" items:

= SUMIFCC("Weight", "Steel")

Price per kg using same-row and aggregate:

= (Qty * ResourceRate) / #cc.WeightKg

Performance

Aggregates iterate over all rows in scope (the current project's items, or the current breakdown's rows depending on where the formula runs). For very large projects this is still fast because values are already in memory — but very complex cross-aggregate formulas may be worth replacing with a Live project parametric.

Where Aggregates Run

The scope of the aggregate matches the scope of the formula:

Formula locationSUMCC scope
Direct Cost itemAll Direct Cost items in the project.
Direct Cost breakdownAll rows in that breakdown only.
Overhead itemAll Overhead items in the project.
Overhead breakdownRows in that overhead's breakdown.
Resource breakdownRows in that built-up breakdown.

Nulls

Rows without a value in the column are skipped by the aggregate. COUNTCC ignores them; SUMCC adds nothing. AVGCC excludes them from both numerator and denominator.

Column Rename / Delete

Renaming a custom column updates the definition JSON but not formula text. After a rename, search formulas for the old name and replace.

Deleting a column is blocked while formulas still reference it.