OK. The original issue got lost along the way. In the sample you had, set SUM_VAL = 0 in event 2, which is what I said originally. To generate the sum each iteration, you need to reset it to 0.
Here's my updated example
Sorry but I don't know where to put the SUM_VAL = 0 statement you suggested.
Event 2 has no condition thus I expect SUM_VAL to always be 0 if I pasted taht there.
Also, value is set to random 1,5 now for every click so I can compare to the brute force sum.