Adding count variables together for a sum total

May 23, 2019

Is there a way to add up the values of count variables to have a sumtotal variable?

9 Replies
Ned Whiteley

Hi Victoria,

I hope the attached example will be of assistance. Two separate count variables are associated with the two dials and a third variable, CounterTotal, displays the total of the two Dial variables.

The triggers are set up such that when you select the Add button, the first thing that happens is that CounterTotal is set to zero, then the value of Dial1 is added to CounterTotal and, finally, the value of Dial2 is added in. If you don't first set the CounterTotal variable to zero, the total will represent the previous total plus the new settings on the dials instead of only the total of the new values.

Ned Whiteley

The Submit button should work in exactly the same way. Just make sure that if you are also using that to jump to a new slide that the triggers are in the right order. The "jump to next slide" trigger should be the last one in the list. If it comes before the variables are adjusted / added, the variables will not be changed as the slide will lose focus before the triggers can be executed.

This discussion is closed. You can start a new discussion or contact Articulate Support.