Does anyone know if it is possible to find the sum of multiple repeated
groups and how to go about doing this?

For instance, I have GROUP A that is repeated X times. I find the TOTAL sum
of GROUP A after it has been repeated X times using { sum(/data/…) }. I
then have GROUP B that is repeated Y times. I find the TOTAL sum of GROUP B
after it has been repeated Y times using { sum(/data/…) }.

I now want to find the TOTAL SUM of GROUP A and GROUP B after they have
been repeated X and Y times. I have tried using {
sum(/data/total-sum-groupA + /data/total-sum-groupB) }. However I keep
getting an error when I try to do this.

You should be able to do something like sum(/data/total-sum-groupA) +
sum(/data/total-sum-GroupB).

Thanks,
Sheel

···
On Thu, May 19, 2016 at 9:23 AM, Ann Duong wrote:

Hi,

Does anyone know if it is possible to find the sum of multiple repeated
groups and how to go about doing this?

For instance, I have GROUP A that is repeated X times. I find the TOTAL
sum of GROUP A after it has been repeated X times using { sum(/data/…) }.
I then have GROUP B that is repeated Y times. I find the TOTAL sum of GROUP
B after it has been repeated Y times using { sum(/data/…) }.

I now want to find the TOTAL SUM of GROUP A and GROUP B after they have
been repeated X and Y times. I have tried using {
sum(/data/total-sum-groupA + /data/total-sum-groupB) }. However I keep
getting an error when I try to do this.

···
On Thursday, May 19, 2016 at 4:20:48 PM UTC+2, Sheel Shah wrote:
>
> Hi,
>
> You should be able to do something like sum(/data/total-sum-groupA) +
> sum(/data/total-sum-GroupB).
>
> Thanks,
> Sheel
>
> On Thu, May 19, 2016 at 9:23 AM, Ann Duong <abd...@gmail.com wrote:
>
>> Hi,
>>
>> Does anyone know if it is possible to find the sum of multiple repeated
>> groups and how to go about doing this?
>>
>> For instance, I have GROUP A that is repeated X times. I find the TOTAL
>> sum of GROUP A after it has been repeated X times using { sum(/data/...) }.
>> I then have GROUP B that is repeated Y times. I find the TOTAL sum of GROUP
>> B after it has been repeated Y times using { sum(/data/...) }.
>>
>> I now want to find the TOTAL SUM of GROUP A and GROUP B after they have
>> been repeated X and Y times. I have tried using {
>> sum(/data/total-sum-groupA + /data/total-sum-groupB) }. However I keep
>> getting an error when I try to do this.
>>
>> Any help would be much appreciated! Thank you.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "commcare-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to commcare-user...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Sheel Shah
> Project Manager | Dimagi
> m: +1.781.428.5419 | skype: sheel_shah
>
>
>