# Repeat Groups Calculations

**URL:** <https://forum.getodk.org/t/repeat-groups-calculations/14807>\
**Category:** Support\
**Tags:** odk-xlsform\
**Created:** [August 28, 2018, 4:07pm UTC](https://forum.getodk.org/t/repeat-groups-calculations/14807 "2018-08-28T16:07:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kimanikihiu](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/k/d2c977/32.png) [@kimanikihiu](https://forum.getodk.org/u/kimanikihiu)\
**Post date:** [August 28, 2018, 4:07pm UTC](https://forum.getodk.org/t/repeat-groups-calculations/14807/1 "2018-08-28T16:07:47Z")

</div>

Hello,

I am trying to limit the total percent of a repeat group(3 repeats) where the total percentage should not to be more than 100%.Unfortunately the total is not updating as intended . I have attached the syntax the repeat group. Please help

[repeat\_test.xlsx](https://getodk.b-cdn.net/uploads/default/original/2X/8/8bf67edac1a94e6da80c8fbea2e830382922ca7d.xlsx) (8.8 KB)

---

<div class="post-metadata">

**Author:** ![Grzesiek2010](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/grzesiek2010/32/2881_2.png) [@Grzesiek2010](https://forum.getodk.org/u/Grzesiek2010)\
**Post date:** [August 28, 2018, 4:40pm UTC](https://forum.getodk.org/t/repeat-groups-calculations/14807/2 "2018-08-28T16:40:37Z")

</div>

Hi @kimanikihiu

you have to move `${lhz_total}` out of the `repeat_group`: [repeat\_test.xlsx](https://getodk.b-cdn.net/uploads/default/original/2X/4/44a0823e6f80069911482eb415e5da4a799d5473.xlsx) (6.0 KB)

---

<div class="post-metadata">

**Author:** ![kimanikihiu](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/k/d2c977/32.png) [@kimanikihiu](https://forum.getodk.org/u/kimanikihiu)\
**Post date:** [August 28, 2018, 5:15pm UTC](https://forum.getodk.org/t/repeat-groups-calculations/14807/3 "2018-08-28T17:15:18Z")

</div>

Thanks @Grzesiek2010

Its working now.

---

<div class="post-metadata">

**Author:** ![kimanikihiu](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/k/d2c977/32.png) [@kimanikihiu](https://forum.getodk.org/u/kimanikihiu)\
**Post date:** [August 29, 2018, 7:31am UTC](https://forum.getodk.org/t/repeat-groups-calculations/14807/4 "2018-08-29T07:31:18Z")

</div>

> [@kimanikihiu](#):
>
> @Grzesiek2010

Hello @Grzesiek2010.

I have just run in to another problem. When I put a value like 51 as the first percentage value I get a constraint message that the value is not allowed. However if I enter 50 the value is accepted . I am suspecting that "${lhz\_total} + . \<=100" is doubling the value or what could be wrong. Thanks

---

<div class="post-metadata">

**Author:** ![kimanikihiu](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/k/d2c977/32.png) [@kimanikihiu](https://forum.getodk.org/u/kimanikihiu)\
**Post date:** [August 29, 2018, 7:36am UTC](https://forum.getodk.org/t/repeat-groups-calculations/14807/5 "2018-08-29T07:36:20Z")

</div>

I finally solved it. the solution is to remove '+ .'
