Hello Everyone,
I try to do some calculations inside of a Iterative Macro but the Results are not what we expected.
EK Column should be 13,93 for all the records but i think the problem is with Running Total which is used in Macro and generates wrong results.
how can i fix this?
(The Picture is basically what we want to get)
Regards
Solved! Go to Solution.
Hi @MostafaBouzari ,
Please check if now it is running as expected, I only corrected the [EK] multi-row formula, since you were filling all value in your first iteration, there were no null values to recalculate this column so I've changed to control this column based on number of iterations
if [Iterations]<=[Engine.IterationNumber]+2 then [RunTot_Value EUR]/[RunTot_Volume] else [EK] endif
Best,
Fernando Vizcaino
You don't actually need an iterative macro to achieve this - you just need to modify your multi-row formula.
In your first original multi-row formula, you were referencing EK for the Value EUR calculation. Most values for EK were null, which is why your Value EUR formula resulted in null values as well. I suggest filling in the EK values first, then using multi-row for Value EUR and the running total.
See attached. Hope this helps!
I don't understand why you need the iterative macro. I got the expected results in-line:
EK was a calculated filed so i couldn't use it the way you used it