Skip to Content
author's profile photo Former Member
Former Member

APO DP relative dates in macros

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 01, 2008 at 09:11 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 08, 2008 at 12:15 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.