on 01-29-2019 12:54 AM
Script logic is not working as expected when trying to divide two specific records. All of the members mentioned in the formula are base level. The amount written back to the data base is 0. Based on the scoping statement there are two source records in the database. The *REC statement is attempting to divide these two records (-1.5 billion divided 41 million). by By changing the “/” operator to a “+” I notice the formula behaves as expected (-1.5 billion + 41 million). Please advise on how to correct the formula so that the division works properly.
*XDIM_MEMBERSET TIME = %TIME_SET%
*XDIM_MEMBERSET DATASRC = D_BPCSKF
*XDIM_MEMBERSET INTERCO = P_NO_INTERCO
*XDIM_MEMBERSET RPTCURRENCY = USD
*XDIM_MEMBERSET SCOPE = G_0001
*XDIM_MEMBERSET TTYPE = F_NO_TTYPE
*XDIM_MEMBERSET COMPANY = CO_600
*XDIM_MEMBERSET CCPC = C_NO_CCPC
*XDIM_MEMBERSET VERSION = ACTUAL
*XDIM_MEMBERSET ACCOUNT = SKF_00352_CALC1,SKF_00352_CALC2
*WHEN ACCOUNT
*IS *
*REC(EXPRESSION= [ACCOUNT].[SKF_00352_CALC1] / [ACCOUNT].[SKF_00352_CALC2],ACCOUNT="SKF_00352",FSGAAP="AC_SKF_00352",DATASRC="D_BPCSKF",INTERCO="P_NO_INTERCO",RPTCURRENCY="USD",SCOPE="G_0001",TTYPE="F_NO_TTYPE",COMPANY="CO_600",CCPC="C_NO_CCPC")
*ENDWHEN
*COMMIT
After you have provided the data sample the issue is clear!
You have not only 2 accounts, but 2 FSGAAP: AC_SKF_00352_CALC1 and AC_SKF_00352_CALC2
Then you need tuple:
*REC(EXPRESSION=%VALUE%/([ACCOUNT].[SKF_00352_CALC2],[FSGAAP].[AC_SKF_00352_CALC2]),ACCOUNT="SKF_00352",FSGAAP="AC_SKF_00352")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim, thanks for your reply.. please see below
These are the source records (1st image attached) I am trying to divide using script logic:
Per your previous comment I have updated the script:
*XDIM_MEMBERSET TIME = %TIME_SET%
*XDIM_MEMBERSET DATASRC = D_BPCSKF
*XDIM_MEMBERSET INTERCO = P_NO_INTERCO
*XDIM_MEMBERSET RPTCURRENCY = USD
*XDIM_MEMBERSET SCOPE = G_0001
*XDIM_MEMBERSET TTYPE = F_NO_TTYPE
*XDIM_MEMBERSET COMPANY = CO_600
*XDIM_MEMBERSET CCPC = C_NO_CCPC
*XDIM_MEMBERSET VERSION = ACTUAL
*XDIM_MEMBERSET ACCOUNT = SKF_00352_CALC1
*XDIM_MEMBERSET FSGAAP = AC_SKF_00352_CALC1
*WHEN ACCOUNT
*IS *
*REC(EXPRESSION=%VALUE%/[ACCOUNT].[SKF_00352_CALC2],ACCOUNT="SKF_00352",FSGAAP="AC_SKF_00352")
*ENDWHEN
In response to your comment "In REC there is no reason to provide not changed dimensions!", the Account and FSGAAP are both changed hence the reason I am mentioning them specifically in the *REC statement.
Here is the result of the script logic log (2nd image attached), still the amount written back is 0.00
Kindly advise on what further changes are needed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Strange script!
The division will be performed twice - due to both records are scoped! Try to scope single account:
*XDIM_MEMBERSET TIME = %TIME_SET%
*XDIM_MEMBERSET DATASRC = D_BPCSKF
*XDIM_MEMBERSET INTERCO = P_NO_INTERCO
*XDIM_MEMBERSET RPTCURRENCY = USD
*XDIM_MEMBERSET SCOPE = G_0001
*XDIM_MEMBERSET TTYPE = F_NO_TTYPE
*XDIM_MEMBERSET COMPANY = CO_600
*XDIM_MEMBERSET CCPC = C_NO_CCPC
*XDIM_MEMBERSET VERSION = ACTUAL
*XDIM_MEMBERSET ACCOUNT = SKF_00352_CALC1 //Single account!
//*XDIM_MEMBERSET FSGAAP = ??? What is the scope?
*WHEN ACCOUNT
*IS *
*REC(EXPRESSION= %VALUE%/[ACCOUNT].[SKF_00352_CALC2],ACCOUNT="SKF_00352",FSGAAP="AC_SKF_00352")
*ENDWHEN
In REC there is no reason to provide not changed dimensions! COMMIT is useless!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
15 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.