Sum() inside the same repeat

Hi Friends,

Suppose, I have a repeat group and under that, I want to ask how much cubic feet is for a particular tree within a community. Repeat for tree can go with any number of times. My intention is to get the sum() of cubic feet of 3 or 4 (suppose) trees just, however tree repeat can go further to any number. Is this possible to achieve in xlsform? Again, I may be wanting to sum() after another 3 or 4 interval of repeat number.

Looking forward to any ideas from ODK friend.
Kind regards,
Raj Pravat

1 Like

Hi @Raj_Pravat

so as I understand you want do display something like a live calculation of all the previous answers in a repeatable group? For example if you have a repeatable group with an integer question and you add three groups:

Group1
answer: 5
result: 5

Group2
answer: 3
result: 8

Group3
answer: 7
result: 15

etc.? am I right?

Hi @Grzesiek2010,
Thanks.

Yes, exactly, your are right. Hope to get a solution help seriously.

Regards,
Raj Pravat

You can still use sum() function which needs to be added outside of the group but it's possible to refer to that value.

sumCalc.xlsx (5.9 KB)

Hi @Grzesiek2010,
Thanks a lot. It worked, super!