1

I would like to come up with a model that takes the previous value and adds it to the current value.

For instance

Value 3, 2, 3, 1

Would result in

-, 5, 5, 4

I have been trying to use Iterate Field Values and Calculate Field, but I can't seem to get it to work. Any tips? Would it be easier to add the current value to the next value?

1 Answer 1

1

Personally I would try and use python in field calculator to achieve the desired result:

accumulate( !HA! )

Pre logic script code:

total = 0

previous = 0 def accumulate(increment): global previous global total if total: total = increment + previous previous = increment else: total = increment previous = increment return total

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.