Hi experts,
I have to write a macro where I have to calculate Final net forecast key figure at day level.
I have FORECAST key figure calculated at day level & another key figure to store cyclic days.
Now I need to add Day level FORECAST key figure for number of cyclic days.
e.g. we have daily FORECAST as
12.552 | 12.552 | 12.552 | 12.552 | 13.509 |
Cyclic days as 5.
Then CYCLIC DAYS DEMAND =
63.717 |
Then we have Safety days demand = safety days supply * STAT FORECAST key figure at day level
e.g. Safety days supply in product master as 4 & STAT FORECAST AT day level as 16.667
SAFETY DAYS DEMAND = 66.668
Then FINAL NET FORECAST = 63.717 + 66.668 / (4+5) = 14.49 --> (4 safety days supply & 5 cyclic days supply)
I attempted to use loopcounter method for this. But seems not working.
Can you pls help with it?
Below is the code:
B1, B2, B3 in sequence
Thanks,
Krutika