Issue with cumulative sum inside a repeat group

Hey @Jellow ! :wave:

:white_check_mark: I've implemented the logic for you - please find the XLSForm and a short demo below!

:arrow_right: Based on your post, I realized that you need two different types of sums here:

  1. Cumulative sum for a specific picker within a repeat instance, which updates as more instances for the same picker are added within the same repeat group.
  2. Overall sum that can be displayed at the end.

:page_facing_up: I have to admit, this one was quite complex! I even had to revisit ODK’s documentation after a long time to implement this one. But here’s the secret sauce that made it work: [XPath Predicates For Filtering] - buried deep within the documentation!

EachPickerDemo

EachPickerSum.xlsx (11.9 KB)

Hope this helps! Wishing you a great day! :mushroom:

5 Likes