# Recursive Row Loop for Sales Forecasting

**URL:** <https://forum.knime.com/t/recursive-row-loop-for-sales-forecasting/12955>\
**Category:** KNIME Analytics Platform\
**Created:** [December 18, 2018, 5:59pm UTC](https://forum.knime.com/t/recursive-row-loop-for-sales-forecasting/12955 "2018-12-18T17:59:49Z")\
**Posts on this page:** 1\
**Showing post:** 9

<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:** [January 16, 2019, 8:02pm UTC](https://forum.knime.com/t/recursive-row-loop-for-sales-forecasting/12955/9 "2019-01-16T20:02:16Z")

</div>

Well, you asked for it. Might be a little bit over engineered … But I still wonder how to handle a loop if I have to reflect on something and ‘remember’ it - yes I can append something at the end of a loop, but sometimes my first idea is to store the intermediate results.

You should really check if you just want such a simple prediction, but anyway, here it comes.

 ![image](https://forum-cdn.knime.com/uploads/default/original/2X/1/19033aa53ba207ce17507f47997327af38e64740.png)

Here I use 2 weeks to predict, you can change that by setting the variable.

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

[kn\_example\_week\_forecast.knwf](https://forum-cdn.knime.com/uploads/default/original/2X/c/c814e722cf1039fbda6c9f00c74881af487200c3.knwf) (89.5 KB)

---

_[View the full topic](https://forum.knime.com/t/recursive-row-loop-for-sales-forecasting/12955)._
