Loading

Creating a Rollup

A rollup totals a child datastore onto its parent — invoice lines into an invoice, timesheet entries into a week, components into an assembly.

What a rollup needs

A rollup is defined on the parent and points down at the child.

  • Datastore — the parent, holding the total.
  • Target Column — the column on the parent receiving it.
  • Aggregate — SUM, COUNT, AVG, MIN or MAX.
  • Child Datastore — where the rows being totalled live.
  • Child Link Column — the column on the child pointing back at the parent. This decides which lines belong to which invoice.
  • Child Value Column — the column being totalled. Not needed for COUNT.
  • Child Filter — optional, below.

A worked example

Invoices have Net Total; invoice lines each have Line Net from a calculated field. The rollup sits on invoices: Net Total as target, SUM as aggregate, invoice lines as child, the invoice reference as the link, Line Net as the value.

Filtering which rows count

Not every child row should be included. The Child Filter uses the same criteria format as table rules, so the full operator vocabulary is available — equals, not equals, greater than, is empty and the rest. Common uses:

  • Billable lines only — cancelled or informational lines stop contributing without being deleted.
  • Outstanding items — a COUNT filtered to lines not yet complete, giving a live count on the header.
  • Subtotals — two rollups on the same parent reading the same child, filtered differently.

A caution about filters

A filtered total is only as trustworthy as the column it filters on. If the billable flag can be changed after approval, the total changes with it. Where that matters, lock the column with field-level permissions, or copy the value onto the line at approval so later edits cannot rewrite history.

Rollups of rollups

A rollup can total a column produced by another definition, provided those values are already calculated. Within one datastore that is the Order column; across datastores it is the timing of the table rules.