Sales Forecast with looping

Hi everbody!

I have already created an Sales Forecast based on ARIMA. I had monthly data from 2017-2019 and used it to predict the Sales for every month in 2019. So far I am pretty happy with the results.

But now I want to expand the workflow so that I can make 12 forecasts for the next 12 months. Once using all the historical data from 2017- 2019 (in 2019 only using January), once with data from 2017-2019 ( in 2019 only using January and February), once with data from 2017- 2019 ( in 2019 only using January,February and March) and so on.

Of course I can create 12 data sets with the required data but is it possible to use one data set and let it be automatically choose the required data? I thought of something like a loop but I am not sure if this is the right Approach.

Thanks for all ideas and help!

Hi Parn,
It will be a complex workflow, but you can do it with a Recursive Loop Start and Recursive Loop End. First you pass in the initial data, then in each iteration you append something and give it to the loop end which will pass it back to the loop start for the next iteration.
Kind regards,

1 Like

Hi there @Parn,

you can try following approach as well. Split your table on two tables. One with 2017-2018 data and another with 2019 data. Then feed 2017-2018 data into Counting Loop Start node which will have go 12 iterations (under assumption you have full 2019 data). In each iteration you can filter your 2019 data based on currentIteration flow variable (+1 cause it starts from 0) to have only January in first iteration, Jan and Feb in second and so on.

Something like this:

Drop me a message if you need example. Hope this helps!



Hi everybody,

thanks for your ideas.

@ipazin this seems to be exactly what i am looking for! I want to rebuild this workflow but I am not totally sure with the configurations, espacially with the rule based row filter. Is it possible for you to upload this workflow? That would help a lot!

Thanks & kind regards!

1 Like

Hi @Parn,

here is attached workflow. You’'ll find out there is no much inside forecast metanode :smiley:
2020_05_18_Forecast_Looping.knwf (35.0 KB)

If any questions feel free to ask.



This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.