# Business rule to sum subset

Hello,

I'am turning nut and maybe be tired... Any help will be highly appreciated !

I want to make a sum-up report with 2 kinds of elements :
- the amount for customers I owe money to (prepayement)
- the total amount for customers that are owing money to me

I have a single list of customer in my dimension Customer with wether a negative or a positive value in the sales cube.
Credit & Debit are 2 members of the Customer dimension.

Let's say "credit" is the sum of the customers that I owe money to, and "Debit", the sum of customers that owe money to me.
I want to calculate "Debit" and "Credit" with a business rule (cause I have no clue to sort negative from positive values in a hierarchy)...

I'm pretty sur it's no rocket science, but I keep stucked.... I need your help !

Thanks a lot for your contributions...

Nicolas
I guess the use of the IF() function could do the trick... but beware of the performance

another way would be to use SupervisionServer for that
laloune

Post hoc, non est propter hoc
Patanok, see attachments.
If you use Jedox 6, performance will be ok (DDE requirements done).
Images
• 1.png

50.73 kB, 1,344×835, viewed 168 times
• 2.png

3.59 kB, 292×157, viewed 174 times
I would mark the ['Sum'] to increase performance

cause you don't need the "=" in IF(['Sum']>=0
laloune

Post hoc, non est propter hoc