Plan availability | All plan types |
Permissions |
|
Platform(s) | Web/Browser, Mac app, and Windows app |
Finding the sum of fields in Airtable
Finding the sum of multiple cells or a subset of cells in a field is one of those scenarios in Airtable that can sometimes be difficult to wrap your head around. Since formulas apply only to other fields within the same record, you can't create a standalone formula in one record that only references other records in the table. Instead, you can sum all of the cells from a field (or a subset of cells) by taking the following steps:
In Airtable, navigate to the table that holds the records that you want to sum. For example’s sake, let’s call this table “Values.”
Create a new linked record field that links records in the “Values” table to a new table. Let’s call this new table “Calc" short for “Calculation.”
Note that you could also link this field to an existing table in your base.
Next, create linked relationships between the “Values” and “Calc” tables.
Summing all record values - Populate every record in the linked record field with the same record in the “Calc” table. You can do this quickly by using the fill-handle. For example, you could title that record in the “Calc” table “All.”
Summing a subset of record values - Populate only certain records by only linking those records to a different record in your “Calc” table. You can also potentially link more than one record from the “Calc” table to the linked record field in your “Values” table. This will create multiple calculations in the “Calc” table based on which record you link from your “Values” table.
In the linked “Calc” table, create a Rollup field that sums the number field with the
SUM(values)function.You can also use other rollup field functions to calculate averages or more complex rollup field formulas.
Note
If you only need to quickly see the sum of an entire field - and not use that sum in another formula - you can quickly do so by toggling on the SUM function in the summary bar.