cancel
Showing results for 
Search instead for 
Did you mean: 

APO DP relative dates in macros

Former Member

Hi guys, perhaps anyone could give input on this issue.

I have a macro that calculates a key figure for the future.

Part of the macro is based on the average of a different key figure for the past 12 months.

I have defined this as an AREA containing the relevant months.

The problem is that as the calculation runs for each future month the area containing the 12 month average moves along with it. This is not what i want, i want the 12 month average to be relative to the current system date, not the date that the calculation happens to have gotten to.

Can this be done? How would you go about doing it?

I can see that my AREA has got some checkboxes called keyfig relative, but i can't seem to find any information on what these actually do, might they be helpful in my case?

Regards

Simon Pedersen

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member

Hi Simon,

There is different options to calculate a "non moving" average.

The easiest is in my opinion the following:

1. Create in your macro a new step with only one time bucket (for example initial, or your first month)

2. Save the result of the average in a variable (use function LAYOUTVARIABLE_SET())

You can then call the variable later on in your macro (LAYOUTVAR_VALUE()).

As I said this is the easiest option, but there is some alternatives (store information in a additional cell (not a row) or fix the horizon in the area)

I hope it will help you.

Thanks and Regards

Julien

Former Member
0 Kudos

HI Simon,

you mean , the average shuold be calculated based on each day.

I think its happening after each month..right?

Macro Iterations happen based time periods in the dataview.I think you have monthly buckets in your dataview.

If you want the average to consider even days,In that case, you need to change the planning buckets profile to contain days in that.

i think i understood your issue properly

regards

umamahesh