You have a Notion database where a rollup property shows the total of a number field from related items. But you cannot directly add a formula to sum multiple rollup values from the same relation. This happens because a rollup property aggregates data from a linked database, and Notion formulas cannot reference another formula that uses a rollup. This article explains the correct method to calculate the sum of a rolled-up property using a combination of relation, rollup, and formula properties.
Key Takeaways: Summing Rollup Values in Notion
- Relation + Rollup + Formula: Create a relation to a helper database, then use a rollup to bring in the values, and finally a formula to sum them.
- Rollup aggregation set to Show Original: This setting displays each individual value from related records instead of a pre-calculated sum.
- Formula property with sum() function: Use the sum() function in the formula property to add the individual rollup values.
Understanding Rollups and Formulas in Notion
A rollup property in Notion lets you pull in data from a linked database and perform an aggregation like Sum, Count, or Average. For example, if you have a Projects database linked to a Tasks database, you can roll up the Hours column from all related tasks and show the total. The rollup does the calculation automatically. However, if you need to use that total inside a formula property, you hit a limitation: Notion formulas cannot reference a rollup property directly. The formula property only accepts inputs from other formula properties, text properties, number properties, date properties, and select properties. Rollups are treated as computed values and are blocked from formula input. To work around this, you must create a helper database, set up a relation, and then use a rollup that exposes individual values so a formula can sum them.
Steps to Calculate the Sum of a Rolled-Up Property
- Create a Helper Database
Create a new database in your Notion workspace. Name it something like “Helper Sum” or “Rollup Values.” This database will hold the individual values you want to sum. It must have at least one number property that will store the values you need to add. - Add a Relation from Your Main Database to the Helper Database
In your main database (the one where you want the final sum), add a relation property. Connect it to the helper database. This relation allows you to link records from your main database to records in the helper database. For each record in your main database, you will link one or more helper records that contain the values you want to sum. - Add a Rollup Property to the Main Database
After creating the relation, add a rollup property to your main database. Set the rollup to use the relation you just created. For the target property, choose the number property from the helper database that holds the values. For the aggregation, select Show Original. This setting displays each individual value from the linked helper records as a list, instead of a pre-calculated sum. The list format is required for the formula to work. - Add a Formula Property to the Main Database
Add a formula property to your main database. In the formula editor, use the sum() function. The syntax issum(prop("Rollup Property Name")). Replace “Rollup Property Name” with the exact name of your rollup property. The sum() function will add all the individual values from the rollup list. - Populate the Helper Database with Values
For each record in your main database, create a corresponding record in the helper database. Enter the number values you need to sum into the number property. Then, link the helper record to the main record using the relation property. Repeat for each value you want included in the sum. - Verify the Formula Result
Check the formula property in your main database. It should now display the sum of all linked helper values. If you add or remove a linked helper record, the sum updates automatically. You can also change the values in the helper database and the formula will recalculate.
Common Issues When Summing Rollup Values
Formula Shows 0 or Blank
If the formula property shows 0 or is blank, check the rollup aggregation. It must be set to Show Original. If it is set to Sum, the rollup already calculates the total, and the formula cannot read the individual values. Also, ensure the rollup property name in the formula matches exactly, including spaces and capitalization.
Rollup Shows Original Values but Formula Returns an Error
This error usually means the rollup property is returning a list with mixed types. For example, if the helper database number property contains text or empty cells, the sum() function fails. Make sure every linked helper record has a numeric value in the number property. You can use a default value of 0 if needed.
Helper Database Becomes Too Large
If you have many values to sum, the helper database can grow quickly. To keep it manageable, consider using a single helper record per main record if you only need one value per relation. Alternatively, you can use a database template or automation to create helper records automatically.
Direct Rollup vs Helper Database Method: Key Differences
| Item | Direct Rollup (Sum Aggregation) | Helper Database with Show Original |
|---|---|---|
| How it works | Rollup property calculates the sum automatically | Rollup shows individual values, formula sums them |
| Can be used in a formula | No | Yes |
| Setup complexity | Simple, one rollup property | Requires helper database, relation, rollup, and formula |
| Data storage | No extra database needed | Extra database stores individual values |
| Update behavior | Updates when linked records change | Updates when linked records change |
You can now calculate the sum of a rolled-up property in Notion by using a helper database and the Show Original aggregation. Next, try using the sum() function with other mathematical operations like average or count in the same formula. For complex calculations, consider nesting multiple sum() calls to add values from different rollup lists.