# Cumulative sum of hidden values in repeat group

**URL:** <https://forum.dimagi.com/t/cumulative-sum-of-hidden-values-in-repeat-group/1995>\
**Category:** Users\
**Created:** [December 12, 2014, 7:51pm UTC](https://forum.dimagi.com/t/cumulative-sum-of-hidden-values-in-repeat-group/1995 "2014-12-12T19:51:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nate](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/n/e95f7d/32.png) [@Nate](https://forum.dimagi.com/u/Nate)\
**Post date:** [December 12, 2014, 7:51pm UTC](https://forum.dimagi.com/t/cumulative-sum-of-hidden-values-in-repeat-group/1995/1 "2014-12-12T19:51:48Z")

</div>

Hi Lauren,

I think that you'd be able to use the sum function to sum the hidden  
fields. Please refer to the wiki page here:  
[https://help.commcarehq.org/display/commcarepublic/CommCare+Functions#CommCareFunctions-sum](https://help.commcarehq.org/display/commcarepublic/CommCare+Functions#CommCareFunctions-sum)

Let us know if you have any further questions.

Cheers,

> **···**
>
> -- Nate Haduch
> 
> Technical Support Analyst  
> Dimagi, Inc | 585 Massachusetts Ave | Suite 3 | Cambridge, MA 02139  
> web: [http://www.dimagi.com/](http://www.dimagi.com/)
> 
> On Fri, Dec 12, 2014 at 2:44 PM, Lauren [lauren.a.theis@gmail.com](mailto:lauren.a.theis@gmail.com) wrote:
> 
> > Hello everyone, I have been trying to search for this question in past  
> > threads, but haven't found it - I apologize if this has been asked before.
> > 
> > I am using a hidden value to calculate the amount of water that a  
> > household uses each day, per water container (container capacity in liters
> > 
> > - number of journeys to fetch water made in one day). This series of  
> > questions was made in a repeat group.
> > 
> > I would now like to make a new hidden value to calculate the total amount  
> > of water (in liters) that a household uses each day, across all water  
> > containers. Essentially, I want a cumulative sum of the hidden value  
> > outputs in the repeat group. How can I do this? I appreciate any and all  
> > help!
> > 
> > Thank you,  
> > Lauren
> > 
> > --  
> > 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-users+unsubscribe@googlegroups.com](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Lauren\_Theis](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/l/34f0e0/32.png) [@Lauren\_Theis](https://forum.dimagi.com/u/Lauren_Theis)\
**Post date:** [December 12, 2014, 7:56pm UTC](https://forum.dimagi.com/t/cumulative-sum-of-hidden-values-in-repeat-group/1995/2 "2014-12-12T19:56:25Z")

</div>

Ah, thank you! So simple I had missed it.

> **···**
>
> On Fri, Dec 12, 2014 at 2:51 PM, Nate Haduch wrote: \> \> Hi Lauren, \> \> I think that you'd be able to use the sum function to sum the hidden \> fields. Please refer to the wiki page here: \> https://help.commcarehq.org/display/commcarepublic/CommCare+Functions#CommCareFunctions-sum \> \> Let us know if you have any further questions. \> \> Cheers, \> \> -- \> Nate Haduch \> \> Technical Support Analyst \> Dimagi, Inc | 585 Massachusetts Ave | Suite 3 | Cambridge, MA 02139 \> web: http://www.dimagi.com/ \> \> On Fri, Dec 12, 2014 at 2:44 PM, Lauren wrote: \> \>\> Hello everyone, I have been trying to search for this question in past \>\> threads, but haven't found it - I apologize if this has been asked before. \>\> \>\> I am using a hidden value to calculate the amount of water that a \>\> household uses each day, per water container (container capacity in liters \>\> \* number of journeys to fetch water made in one day). This series of \>\> questions was made in a repeat group. \>\> \>\> I would now like to make a new hidden value to calculate the total amount \>\> of water (in liters) that a household uses each day, across all water \>\> containers. Essentially, I want a cumulative sum of the hidden value \>\> outputs in the repeat group. How can I do this? I appreciate any and all \>\> help! \>\> \>\> Thank you, \>\> Lauren \>\> \>\> -- \>\> 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-users+unsubscribe@googlegroups.com. \>\> For more options, visit https://groups.google.com/d/optout. \>\> \> \> \> \> \> -- \> You received this message because you are subscribed to a topic in the \> Google Groups "commcare-users" group. \> To unsubscribe from this topic, visit \> https://groups.google.com/d/topic/commcare-users/BcXRL4laOZU/unsubscribe. \> To unsubscribe from this group and all its topics, send an email to \> commcare-users+unsubscribe@googlegroups.com. \> For more options, visit https://groups.google.com/d/optout. \>
