Lookups, Rollups and Counts
Pull a value across a relation, summarise it, or count the rows behind it. The full aggregation list, conditions, lookup limits, and how any of them opens as an editable formula.
4 min read
On this page
Once a relation links rows together, three field types read across that link:
- Lookup — show a field from the rows the relation points at.
- Rollup — summarise a field across those rows.
- Count — how many rows the relation points at.
All three are configured the same way, in one panel, and all three are read-only: the value is derived from the other table and recalculated when that table changes.
Pick the simplest tool that answers the question#
| Question | Use | Example |
|---|---|---|
| “What values are on those rows?” | Lookup | Show every invoice due date for a client |
| “What is the combined answer?” | Rollup | Sum transaction Amount for a vendor |
| “How many rows are linked?” | Count | Count open invoices for a client |
| “I need several steps or custom conditions” | Formula | Calculate overdue exposure from amount, status, and due date |
A rollup does not copy its answer into an editable cell. BankSync stores the computed result, invalidates it when an input changes, and replaces it after recalculation. While that work is outstanding, the previous value is labelled Recalculating instead of disappearing.
Configuring one#
Add a lookup, rollup or count
Add the field
Click the "+" at the right end of the header row and pick Lookup, Rollup or Count.
Choose the relation
Which relation field on this table to read across. Count needs nothing further.
Choose the field on the other table
Any of its fields, including its own computed and system fields — filtered to the ones the aggregation you pick can actually read.
Choose the aggregation
Rollups only. The list is grouped by what it produces (see below).
Narrow it, if you want
Add a condition so only some of the linked rows count, and for a lookup, cap how many items it displays.
Check the preview, then save
The panel evaluates your configuration against three real rows before you commit it.
The aggregations#
A rollup's aggregation list is filtered to what the target field can answer — you are not offered Sum over a text column. The full set:
| Group | Aggregations |
|---|---|
| Show | Show original, Show unique values |
| Count | Count all, Count values, Count unique values, Count empty, Count not empty, Checked, Unchecked |
| Percent | Percent empty, Percent not empty, Percent checked, Percent unchecked, Percent per option |
| Number | Sum, Average, Median, Min, Max, Range, Standard deviation, Standard deviation (population), Variance, Variance (population) |
| Date | Earliest date, Latest date, Date range |
| Checkbox | All are checked, Any is checked |
| Per option | Count per option |
| Text | Joined list |
The configurator opens on a sensible default for the field you picked: Sum for a number, Latest date for a date, Percent checked for a checkbox, Count per option for a select, and Show original otherwise.
An aggregation over no linked rows at all answers honestly: the numeric ones are blank, the counts are 0, "All are checked" is true and "Any is checked" is false.
Conditions#
Any of the three can carry a condition over the rows on the other side, so you can build "open invoices" as a count of linked invoices whose status is not Paid, or "spend this quarter" as a sum restricted by date. The condition is part of the field, applies everywhere the value is read, and is not the same thing as a relation's picker filter — which only narrows a search box.
Lookups and long lists#
A lookup shows values, not a summary, so it can produce a list. You can cap how many items it displays, up to 100. Lists render as chips in the grid; per-option results render as chips with their counts.
Open as formula#
Underneath, a lookup, rollup or count is a formula that BankSync writes from your choices. Open as formula shows you that expression:
sum(map({Invoices}, current.{Amount}))count(filter({Invoices}, current.{Status} != "Paid"))You can read it to check the field does what you meant, and you can take it over and edit it. Editing it turns the field into an ordinary formula — the configurator's dropdowns no longer describe it, so they stop being offered. There is no way back other than building a new preset field.
Over the REST API the field still reports which preset produced it, so a consumer can tell a rollup from a hand-written formula.
Chaining, and where it stops#
A rollup may read a field that is itself a rollup — line item to invoice to customer to region is a legitimate chain, and BankSync allows it. What it does not allow is an unbounded one:
- a computed field may reach at most 5 hops away from its own row. Further than that is
#DEPTH!on the cell, never a partial answer; - a cycle — two fields that would need each other's answer — is rejected when you save the field, not discovered later;
- each relation cell it traverses is bounded at 100 links.
Reading the cell#
- A value that is waiting to be recalculated says Recalculating. It never shows a blank it has not earned.
#REF!means the field or table it reads has been deleted or trashed. Restoring it clears the error.#TYPE!means the target field was retyped into something the aggregation cannot read.#DEPTH!means the chain is more than 5 hops long.
Because the results are stored on the row rather than computed on the fly, you can sort by a rollup, filter on one, chart and group one on a dashboard, and read one over the API exactly as you would a stored column.
Where to go next#
- Formulas — the full function list and error states.
- Building dashboard widgets on a table — chart a rollup.
Use this page with your AI assistant
Every BankSync doc is available as plain Markdown for agents and LLMs.