Skip to main content
Version: Latest

Rollup

Rollup fields are used to aggregate data from fields in the related table. Often used to calculate totals, averages, and other aggregate data.

Create a Rollup Field

  1. Click on + icon to the right of Fields header
  2. On the dropdown modal, enter the field name (Optional).
  3. Select the field type as Lookup from the dropdown.
  4. Select the link field from the dropdown. This is the field that links the current table to the related table.
  5. Select the field for display from the dropdown. This is the field that will be displayed in the current table.
  6. Select the aggregation function from the dropdown. This is the function that will be used to aggregate the data.
  7. Click on Save Field button.

image

Aggregation Functions

Here's a table with brief descriptions for each of the aggregation functions supported by NocoDB:

Aggregation FunctionDescription
CountCounts the number of records in a dataset.
MinimumRetrieves the minimum value from a dataset.
MaximumRetrieves the maximum value from a dataset.
AverageCalculates the average value in a dataset.
SumAdds up all the values in a dataset.
Count DistinctCounts the number of distinct values in a dataset.
Sum DistinctAdds up all the distinct values in a dataset.
Average DistinctCalculates the average of distinct values in a dataset.