Formula- sum of values across rows

How do I do a sum of values across rows? For example, let’s say there are three rows with two columns- status (Single select- ‘active’, ‘inactive’); balance amount (number). How do I display a value which is equal to the sum of balance amount of rows whose status is active?

Hi,

You can use the footer aggregations for a temporary calculation. But if you want to store the sum, I would recommend to create a second table and store the Status as a linked field:

  1. Create a table Statuses
  2. Add 2 records: active and inactive
  3. Change the field type in your Balances table to Link to table. Make sure the checkbox Create related field in linked table is active
  4. Active active or inactive to each row
  5. Check the Statuses table. A new field was added that sums up all the linked rows that are either active or inactive. You can use this field to calculate the sum of all those rows with the following formula: sum(lookup('Balances','Amount'))