I’m working on an Airtable database and need help with a formula. I have two tables set up. The first table tracks parts and includes a calculated field showing the unit price for each part. The second table is for finished items and has a linked field that connects to the parts table. I want to create a new column that automatically totals up all the unit prices from the selected parts. For example, if I choose three different parts in my linked field, I want their individual unit prices to be added together automatically. Is there a way to make this work in Airtable?
I ran into this exact situation when building a product cost tracker last year. The rollup approach mentioned above is definitely the right solution, but I’d add that you need to make sure your unit price field in the parts table is properly formatted as a currency or number field first. If it’s text or formula-based, the rollup might not calculate correctly. Also worth noting that rollup fields update automatically whenever you modify the linked records, so if you change a part’s unit price, all your finished items will reflect the new totals immediately. One thing that caught me off guard initially was that deleted linked records don’t show any warning in the rollup total, so double-check your links if numbers seem off.
Just wanted to chime in since I’ve dealt with similar setup challenges. While rollup fields are indeed the solution here, one aspect that tripped me up was handling conditional calculations. If you ever need to sum only certain parts based on criteria, you might run into limitations with basic rollups. In those cases, I found it helpful to create a formula field in the parts table first that returns the unit price only when specific conditions are met, then rollup that calculated field instead of the raw unit price. Another consideration is performance - if you’re dealing with hundreds of linked records, rollup calculations can slow down your base noticeably. Keep an eye on loading times as your database grows.
yeah thats pretty straighforward - just use a rollup field, not a formula. in your finished items table, add a new field, pick ‘rollup’, then select linked parts and unit price column. set it to SUM and it’ll add everything up automatically when you link.