Hi Marco,
You can use sum() to add up values inside repeats. You just need to add a
step inside your repeat to make sure a value is never empty (depending on
your case, you can either use a default of 0 or use an if() statement to do
this).
See https://groups.google.com/forum/#!topic/formhub-users/xrOv7wcLf7o and
this XLS Formhttps://groups.google.com/forum/#!topic/formhub-users/xrOv7wcLf7o
.
P.S. This question would be the for the ODK Community forumhttps://groups.google.com/forum/#!forum/opendatakit(not the developers forum).
Cheers,
Martijn
ยทยทยท
On Thursday, January 9, 2014 6:45:13 AM UTC-7, ma.g...@gmail.com wrote:
>
> I'm trying to understand if it's possible to make calculations across
> repeats (not inside that's working perfectly).
>
> In example, in every group I put inside the calculation of the (sub)total
> cost, calculated by multiplicating "Unit No." and "Unit Price".
> Once the enumerator has compiled all the repeats, I'd like to have a
> calculated field where I display the Grand Total, given by the sum of each
> single (sub)total.
>
> Is it possible to implement in ODKCollect-JavaROSA?
>
> And if it's also possible to use multiplication instead of the sum
> operations?
>
> I attach an example form in excel I'm trying to implement for demo purpose.
>
> Thanks
>
> Marco
>
>