0

# How to do calculation on sum.

Hi.

I wondered if it was possible to do anything with the built in sum.  I was wanting to take 1 sum away from another to get a balance.  Or is there a bit of code to sum 2 fields eg credit and debit then subtract one from the other.

Thanks for any pointers.

2replies Oldest first
• Oldest first
• Popular
• simon
• simon
• 2 yrs ago
• Reported - view

By built in sum I assume you mean the one at the end of a table column? You can't use this per se (and note it changes depending on any filters you apply to the table).
The formula for the sum of values in a a table is simply "sum('Field') - so in your example above, sum(credit)-sum(debit) would give the result you require. Note this this will include ALL credits and debits in a table.

Like
• simon
• simon
• 2 yrs ago
• Reported - view

By built in sum I assume you mean the one at the end of a table column? You can't use this per se (and note it changes depending on any filters you apply to the table).
The formula for the sum of values in a a table is simply "sum('Field') - so in your example above, sum(credit)-sum(debit) would give the result you require. Note this this will include ALL credits and debits in a table.

Like
Like Follow
• 2 yrs agoLast active
• 2Replies
• 444Views