Skip to Content
0

Calculation not working properly

Nov 28, 2017 at 03:44 AM

26

avatar image
Former Member

Hi

i have 2 table

1, Account grouping

2. Account Balance

Account grouping Table

account code will be grouped based on the value

Ex.

Account grouping , account code, condition

AP 1000 if account balance < 0(minus)

AR 1000 if account balance > 0(plus)

AP 1002 if account balance < 0(minus)

AR 1002 if account balance > 0(plus)

AP 1003 if account balance < 0(minus)

AR 1003 if account balance > 0(plus)

Account Balance

Company Account code balance

1000 1000 400

1000 1002 -500

1000 1003 -700

I need to show

Company Accountgrouping balance

1000 AP 1200

1000 AR 400

I could able to achieve the same with account code

company accountgrouping account code balance

1000 AP 1000 400

1000 AR 1002 -500

1000 AR 1003 -700

However when i remove the account code, it gives weird result

1000 AP -1200

1000 AR -1200

I performed following

1. In account balance table, created calculated field (sign)as

if balance > 0 then Plus else Minus

2. if sign = condition (table1 ) then balance else 0

Can you guide and let me know whats going wrong here

BI version 4.1 sp9

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Arijit Das Nov 28, 2017 at 12:52 PM
0

Use following variable:

v_Group =If([Balance] ForEach([Account code]) <0 ; "AP";"AR")
Share
10 |10000 characters needed characters left characters exceeded