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

BPC Logic Issue

Hi,

I am trying to learn the script logic and facing this issue :

I want to calculate : ACCOUNT A = ACCOUNT B + ACCOUNT C.

FOR THIS I HAVE DEFINED THE SCRIPT LIKE THIS :

*XDIM_MEMBERSET CATEGORY = BUDGET

*XDIM_MEMBERSET TIME = %TIME_SET%

*WHEN ACCOUNT

*IS "B"

*REC(EXPRESSION = (%VALUE%)+[ACCOUNT].[C],ACCOUNT = "A")

*ENDWHEN

The code is getting validated successfully and when I am running it then following are the cases which I am getting :

In Excel Input Form if I enter : ACCOUNT B = 10 , ACCOUNT C = 10 THEN THE ACCOUNT A = 20 , which is correct and its working.

But when I enter the data in such way : ACCOUNT B = ,ACCOUNT C = 10 ,ACCOUNT A = 0. It should show 10 but its not because I kept Account B blank this time.

So, my query is if above way is not correct then Please guide me how I can script : ACCOUNT A = ACCOUNT B + ACCOUNT C , so that it shows result in all condition even when any of the member account is blank .

Please guide.

Thanks

NATASHA

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jul 19, 2014 at 09:01 AM

    Hi Natasha,

    2 WHEN/ENDWHEN loops required

    If it's default.lgf then (no XDIM_MEMBERSET!):

    *WHEN CATEGORY

    *IS BUDGET

    *WHEN ACCOUNT

    *IS "B"

    *REC(EXPRESSION = %VALUE%+[ACCOUNT].[C],ACCOUNT = "A")

    *ENDWHEN

    *ENDWHEN

    *WHEN CATEGORY

    *IS BUDGET

    *WHEN ACCOUNT

    *IS "C"

    *REC(EXPRESSION = %VALUE%+[ACCOUNT].[B],ACCOUNT = "A")

    *ENDWHEN

    *ENDWHEN

    If this script is DM package, then:

    *XDIM_MEMBERSET CATEGORY = BUDGET

    *XDIM_MEMBERSET ACCOUNT= B

    *WHEN ACCOUNT

    *IS *

    *REC(EXPRESSION = %VALUE%+[ACCOUNT].[C],ACCOUNT = "A")

    *ENDWHEN

    *XDIM_MEMBERSET ACCOUNT= C

    *WHEN ACCOUNT

    *IS *

    *REC(EXPRESSION = %VALUE%+[ACCOUNT].[B],ACCOUNT = "A")

    *ENDWHEN

    Vadim

    Add a comment
    10|10000 characters needed characters exceeded

    • The syntax exists:

      *WHEN_REF_DATA = MASTER_DATA //loop all members including empty

      To be placed before WHEN/ENDWHEN

      But this statement affects all dimensions and the resulting performance will be terrible.

      In most cases it's better to repeat WHEN/ENDWHEN loops.

      Also, for DM package and simple sum of accounts you can use code in my second post (not for default.lgf)

      Vadim

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.