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
- Click on
+
icon to the right ofFields header
- On the dropdown modal, enter the field name (Optional).
- Select the field type as
Rollup
from the dropdown. - Select the link field from the dropdown. This is the field that links the current table to the related table.
- Select the field for display from the dropdown. This is the field that will be displayed in the current table.
- Select the aggregation function from the dropdown. This is the function that will be used to aggregate the data.
- Click on
Save Field
button.
Aggregation Functions
Here's a table with brief descriptions for each of the aggregation functions supported by NocoDB:
Aggregation Function | Description |
---|---|
Count | Counts the number of records in a dataset. |
Minimum | Retrieves the minimum value from a dataset. |
Maximum | Retrieves the maximum value from 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. |