Hello Community!
Hope this post finds everyone safe and sound. I am posting this hoping someone can help me optimize my approach since for one product it is taking 4-5 minutes and I have about 600 products to batch and iterate through.
The Data:
| Date | Product | Growth | $ Value | Scenario |
| 2020-01-01 | 1 | | 50 | Actual |
| .. | 2 | | | Actual |
| .. | 3 | | | Actual |
| 2021-01-01 | 1 | 50% | 100 | Actual |
The Goal:
| Date | Product | Growth | $ Value | Scenario |
| 2021-7-01 | 1 | 50% | 100 | Actual |
| 2021-8-01 | 1 | 50% | 100 | Actual |
| 2021-9-01 | 1 | 50% | 100 | Actual |
| 2021-10-01 | 1 | 50% | 100 | Actual |
| 2021-11-01 | 1 | 50% | 100 | Actual |
| 2021-12-01 | 1 | 50% | 100 | Actual |
| 2022-01-01 | 1 | AVG OF LAST 6 = 50% | Last year * 1+projected growth 100*(1+50%) = 150 | Projection |
| 2022-02-01 | 1 | AVG OF LAST 5 Act + 1 Forecast = 50% | 100*(1+50%) = 150 | Projection |
| .. | 2 | ... | ... | Projection |
| .. | 3 | ... | ... | Projection |
| 2022-12-01 | 1 | ... | .... | Projection |
Using a generate rows gets me the dates for the projections to append the nulls. After that I have a really slow batch macro that takes one product at a time and inside it an iterative macro that takes All actuals + 1 forecast at a time.
I was hoping an expert knows a good and efficient way to do this in Alteryx. Any guidance is appreciated.
Thanks.