Former Member

# Rolling averages

Experts,

We have a business requirement to have some computed accounts in the hierarchy.

1) Some accounts are categorized as rolling averages. Meaning this account represents average of YTD accumulation of a different account. Like Rolling average of Inventory account.

AVGINV(Jan) = INV(Jan)

AVGINV(Feb) = (INV(Jan) + INV(FEB))/2

AVGINV(Mar) = (INV(Jan) + INV(FEB) + INV(MAR))/3 so on

How do i achieve this

2) For some avg accounts, sometimes the source account itself could be a dynamic calculated account .i.e sum of collection of accounts. Like in above case INV itself is a computed account as sum of 10 other accounts.

3) I have some calculated accounts which represents sum of 25 other accounts. Isn't it too much for MDX.

Can you share your thoughts on how you would go about implementing this. Ours is a Periodic application, NW 7.5

- Not sure it is advisable to have dimension logic for this kind of requirement. Also how to do it using MDX if we have to.

- But if we go with script logic, can a calculated account be part of calculation for other calculated account in script logic?

10|10000 characters needed characters exceeded

### Related questions

• Posted on Dec 12, 2011 at 02:40 AM
10|10000 characters needed characters exceeded
• Former Member Former Member

As far as i know , It is difficult to implement this requirement in dimension logic.

• Former Member
Posted on Dec 14, 2011 at 04:27 AM

Hi,

If you want to use a dimension formula, it should be something like:

`SUM({(OpeningPeriod([TIME].CurrentMember):([TIME].CurrentMember))},[ACCOUNT].[INV]) / ([TIME].CurrentMember.Properties("MONTHNUM"))`

Please note that this is just an example, and only considers that the CV of time is a month. However, if you select a parent member for the time dimension, the formula might not work properly. You will need to adjust your formula based on the actual requirement.

Hope this helps.

10|10000 characters needed characters exceeded