Hello,
I am not able to find the correct synthax for a macro with an intermediate calculation.
Here is the description of my issue:
1) My Macro run interactively.
2) according to the level display, I want the macro to calculate the Forecast Lag Deviation.(FLD)
Here is a example :
For one unique product displayed
FLD = (1 - (abs(Forecast Lag - Sales) ) / Sales ) * 100
For one family of product displayed, I want the same formula, but I want the difference (abs (Forecast Lag - Sales) to be the sum of each single product differrence
Example : Forecast Lag Sales
Family 200 300
Product 1 50 200
Product 2 150 100
If I run my current Macro, I have the following calculation KO:
FLD = (1 - (abs(200-300)/300))*100 = 66%
Here is the coorect calculation :
FLD = (1 - (150 + 50) / 300) = 33%
150 is the difference for product 1
50 is the difference for product 2
How can I convert this formula in a DP Macro ?
I imagine the solution with LAYOUTVAR which would be the intermediate sum of each product of the family, but I have no idea of the correct synthax.
Could you please help me ?
Thanks a lot.
Pierre