CUMULATE circular reference
Hello,
There are similar posts on this topic, but none of the solutions seem to work.
I am trying to create an inventory calculation that allows the user to delay/push production to subsequent periods. Then, the total production that has been pushed will be produced at one time.
CUMULATE is currently used to aggregate the production amounts to be pushed and creating a circular reference when trying to pull in the cumulate amount from the prior period. Since it is the prior period, it should not be circular.
I have tried LAG in strict mode and PREVIOUS, and both result in circular reference error.
The LAG function works for “~Production not pushed”. So, I believe the CUMULATE function is the cause of the error, is there a way around this?
Thanks!
Mike
Best Answer
-
Hello @ManjunathKN,
Thank you for your reply. I tried the adjustment suggested and still ran into the circular reference error. I do believe that the CUMULATE calculation was the cause.
So, I worked an IF statement to do the cumulation instead, and it appears to be working.
Thanks again for taking the time to look at this with me.
Thake care,
Mike
1
Answers
-
Hi
As far as i can understand, i see, the reason for circular reference is because of line item " Amount to be pushed to next week" Because it is not strict data (the data is looping).
Instead of "IF not Production push then 0 else production needed" Can you try "IF Not Production push then 0 else Lead(Ending inventory,-1, Production Needed, Strict)".
Thanks,
Manjunath0