cancel
Showing results for 
Search instead for 
Did you mean: 

Calculation not working properly

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

arijit_das
Active Contributor
0 Kudos

Use following variable:

v_Group =If([Balance] ForEach([Account code]) <0 ; "AP";"AR")