We can sum the total of a field across all instance by incorporating smart variables into the equation of a calculated field.

Step 1. Create the calculated field

Step 2. Add syntax. Here we are summing and adding the smart variables current-instance and previous-instance when referencing the fields

sum([number][current-instance],[numbersum][previous-instance])

This says sum the value of the number field in the current instance with the previous instance of the calculated field named numbersum. This way,

each new instance will give you a running total up to that point.



More information on repeating forms and calculated fields can be found on the Help & FAQ page in REDCap

For additional assistance, please contact the REDCap Support Team

  • No labels