cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Logic Script to run calculation

Former Member
0 Likes
218

I wrote the following logic script to get NET_INCOME=SALES-EXPENSE+OTHER_INCOME.

*XDIM_MEMBERSET ACCOUNT = SALES, EXPENSE,OTHER_INCOME, NET_INCOME

*XDIM_MEMBERSET TIME=%TIME_SET%

*WHEN ACCOUNT

*IS SALES

*REC(EXPRESSION = %VALUE%, ACCOUNT = NET_INCOME)

*IS EXPENSE

*REC(EXPRESSION = -%VALUE%, ACCOUNT = NET_INCOME)

*IS OTHER_INCOME

*REC(EXPRESSION = %VALUE%, ACCOUNT = NET_INCOME)

*ENDWHEN

*COMMIT

It works well at the base level, but not at the top level. The amount of NET INCOME at the top level is as the same as that at the very last base level in my report. See my report below

The NET INCOME results for Jan-Dec 2018 are correct, however, the 2018 Total NET INCOME (yellow highlight) took Net Income amount from Dec 2018. The correct 2018 total net income amount should be 287,240 (545,686-258,972+526).

This is a Default logic script. The version of BPC is NW10.1.

Did I have something missing in my logic script or any errors?

Thanks in advance for your help!

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Likes

Your NET_INCOME account have incorrect ACCTYPE: instead of correct INC you have BS type LEQ. And LEQ is always YTD and Year total = DEC!

Former Member
0 Likes

Thanks Vadim for solving this issue for me!

Answers (0)