# Stop my loop if the column sum is greater than 50% of my flow variable

**URL:** <https://forum.knime.com/t/stop-my-loop-if-the-column-sum-is-greater-than-50-of-my-flow-variable/48262>\
**Category:** KNIME Analytics Platform\
**Created:** [October 21, 2022, 6:44am UTC](https://forum.knime.com/t/stop-my-loop-if-the-column-sum-is-greater-than-50-of-my-flow-variable/48262 "2022-10-21T06:44:08Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [October 21, 2022, 2:21pm UTC](https://forum.knime.com/t/stop-my-loop-if-the-column-sum-is-greater-than-50-of-my-flow-variable/48262/6 "2022-10-21T14:21:55Z")

</div>

@kowisoft it could look something like this. Collection the iterating values in a temporary file and appending that at each step of the loop. And then like you have already done collect the sum of the column and then make a decision to sop (or not). Maybe not the most elegant way…

Just make sure to reset the temporary file. One could also automate that by using a switch catching the first iteration of the loop (I have and example of that somewhere).

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/2/2/22a96e9b3b0ef002e9e1bb3bfc0b49a030d22302.png)

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/2/5/25c8b0a937ffd63d5a565ebafd78ed59e0e89b7e.png)

> **[Stop my loop if the column sum is greater than 50% of my flow variable –...](https://hub.knime.com/mlauber71/spaces/Forum/latest/2022/kn_forum_48262_while_condition_example_recursive_loop~aaeX-GbHDps77Nng)**
>
> Stop my loop if the column sum is greater than 50% of my flow variable

---

_[View the full topic](https://forum.knime.com/t/stop-my-loop-if-the-column-sum-is-greater-than-50-of-my-flow-variable/48262)._
