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

Yearly average calculation

Hi,

It may sound like trivial but I can't find the way to compute a yearly average considering only on the months that have data.

Considering the fact that I need to store this yearly average, I have to use a script logic.

Here is what I have tried but to no avail:

*CALC_EACH_PERIOD

*WHEN ACCOUNT

*IS #INCOMETAXPERCCUM

*REC(TIME=NEXT)

*IS #COUNT

*REC(TIME=NEXT)

*IS INCOMETAXPERC

*REC(EXPRESSION=1,ACCOUNT=#COUNT,TIME=NEXT)

*REC(ACCOUNT=#INCOMETAXPERCCUM,TIME=NEXT)

*REC(EXPRESSION=(%VALUE%GET(ACCOUNT=#INCOMETAXPERCCUM))/(1GET(ACCOUNT=#COUNT)),CATEGORY="%CATEGORY_SET%", TIME="OPE.PLAN")

*ENDWHEN

When I check the debug log, I notice that the two temporary variables #INCOMETAXPERCCUM and #COUNT are only computed for the first member that is included in my ENTITY memberset but not for the others. Besides, it does not cumulate as I would expect it would.

Any idea what I am doing wrong?

Thanks in advance,

Regis

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2010 at 10:24 AM

    Hi Regis,

    Can you please explain the login in simple english. We will try to help you out on that.

    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.