cancel
Showing results for 
Search instead for 
Did you mean: 

ADDITION USING SCRIPT LOGIC

Former Member
0 Kudos

Hi All,

Under 'INCOME' i have 3 accounts.

account1

account2

account3

i want to add the value of these 3 account then i want to multiply with 3

the result i want to display in "account4"

What is the required script logic for this?

Regards,

Phanikumar.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Phani Kumar,

BPC 7.0 NW doesnt support GET, so you cannot have the script as

*WHEN ACCOUNT
*IS "ACCOUNT1"
   *REC(EXPRESSION=(%VALUE% + GET(ACCOUNT="ACCOUNT2") + GET(ACCOUNT="ACCOUNT3"),ACCOUNT="ACCOUNT4")
*ENDWHEN

Instead you can modify the script to

*WHEN ACCOUNT
*IS "ACCOUNT1","ACCOUNT2","ACCOUNT3"
   *REC(FACTOR = 3, ACCOUNT="ACCOUNT4")
*ENDWHEN

If you want to go with MDX, then you can use as suggested earlier

[ACCOUNT].[#account4]=([ACCOUNT].[account1]+[ACCOUNT].[account2]+[ACCOUNT].[account3])*3

Hope this helps.

Former Member
0 Kudos

Hi Nilanjan,

I understood the concept.

Regards,

Phanikumar.

Former Member
0 Kudos

Phanikumar, below is a sample BPC SQL script for adding the 3 values and storing them in Account4.

I hope this helps.

Sean

*WHEN ACCOUNT

*IS "ACCOUNT1"

*REC(EXPRESSION=(%VALUE% + GET(ACCOUNT="ACCOUNT2") + GET(ACCOUNT="ACCOUNT3"),ACCOUNT="ACCOUNT4")

*ENDWHEN

Former Member
0 Kudos

Hi,

You can use,


[ACCOUNT].[#account4]=([ACCOUNT].[account1]+[ACCOUNT].[account2]+[ACCOUNT].[account3])*3

here, ACCOUNT is the name of the dimension where the members account1,account 2 etc are present.

Hope this helps,

Regards,

G.Vijaya Kumar

Edited by: G.Vijaya Kumar on Jul 9, 2010 6:38 AM