Rollup
A Rollup field aggregates data from fields in the related table. Use it to calculate totals, averages and other aggregate data.
Copy a prompt, paste it into NocoAI in any base, and replace the words in [brackets] with your own.
- Add a field to [Customers] that totals [Amount] across their [orders]
- Add a field to [Projects] that counts their linked [tasks]
- Add a field that shows the latest [Order Date] for each [customer]
Create a Rollup Field
- Click the
+icon to the right of theFields header. - In the dropdown modal, enter the field name (optional).
- In the dropdown, select the field type
Rollup. - In the dropdown, select the link field. This field links the current table to the related table.
- In the dropdown, select the field to show. The current table shows this field.
- In the dropdown, select the aggregation function. NocoDB uses this function to aggregate the data.
- Click the
Save Fieldbutton.

Aggregation Functions
NocoDB supports these aggregation functions:
| Aggregation Function | Description |
|---|---|
| Count | Counts the number of records in a dataset. |
| Minimum | Returns the minimum value in a dataset. |
| Maximum | Returns the maximum value in a dataset. |
| Average | Calculates the average value in a dataset. |
| Sum | Adds up all the values in a dataset. |
| Count Distinct | Counts the number of distinct values in a dataset. |
| Sum Distinct | Adds up all the distinct values in a dataset. |
| Average Distinct | Calculates the average of distinct values in a dataset. |
Conditional Rollup ☁
A Rollup field does calculations, such as sum, average and count, on linked records from a related table. By default, the rollup includes all linked records. But you can include only the records that meet specific conditions.
To do this, turn on the option: Only include linked records that meet specific conditions
This option filters the linked records before NocoDB does the rollup calculation. Use it to aggregate values with a condition. For example, sum the revenue for a period, or count the items that meet a threshold.
Applying filters
- Turn on Only include linked records that meet specific conditions.
- Click Add filter. Define the condition or conditions with fields from the related table.
- To combine filters with AND/OR logic, use Add filter group.
- Click Save Field. NocoDB applies the filters.
Similar links-based fields
Last updated on