Skip to content

CALCULATE

Action

Bases: BaseSchemaAction

Calculate the value of a field derived from the values of other fields. Requires a MODIFIER indicating whether the fields should be added or subtracted from the current total.

Script template

"CALCULATE > 'destination_field' < [modifier 'source_field', modifier 'source_field', etc]"

Where the modifier is either of + or -. If you want to change the sign of the values in a column, before further arithmatic, you'll need to do this sort of script:

"CALCULATE > 'destination_field' < [modifier 'source_field', modifier CALCULATE < [- 'source_field']"

Example

"CALCULATE > 'total' < [+ 'income', - 'expenses']"

Warning

This is still very rudimentary. Enhancements should stick to basic reverse Polish notation arithmetic.