Skip to Content
0
Former Member
Feb 19, 2011 at 06:49 PM

How to create a Script Logic to compute a formula within grouped values

30 Views

Hi,

I need to create a script logic which computes a formula and save the result in a specific member of a third dimension.

Specifically, I need to compute a formula for all members of the dimension 'PLATFORMS' and save the result of the mentioned formula in a specific member of a third dimension named 'INDICATOR' which I defined as 'IMP_105'.

I have three dimensions into account. They are 'PLATFORMS', 'REFERENCE' and 'INDICATOR'.

The formula has to divide the grouped amount of the indicator 'IMP_001' of the whole dimension 'REFERENCE' for a given Platform, between the indicator 'IMP_002' of the reference member 'REF_NA' and the Platform we are considering at this moment.

For example:

PLATFORM:

A

B

REFERENCE:

REF_NA

REF1

REF2

REF3

INDICATOR

IMP_001

IMP_002

IMP_105

And we have values:

A - REF1 - IMP_001 --> 10

A - REF2 - IMP_001 --> 20

A - REF3 - IMP_001 --> 30

A - REF_NA - IMP_002 --> 5

B - REF1 - IMP_001 --> 200

B - REF2 - IMP_001 --> 200

B - REF3 - IMP_001 --> 300

B - REF_NA - IMP_002 --> 10

And finally, the logic should compute as a result:

A - REF_NA - IMP_105 --> 60/5=12

B - REF_NA - IMP_105 --> 700/10=70

I would appreciate any help you could give me.

regards,