the expression you provide will not work
=sum(iif(FieldName!Value < 0,FieldName!Value,0))
Here is the detail data for those customers with negative balance. For example cust2 = -50 and cust3 = -30
Cust ID Ord # Balance
cust2 1 100
cust2 2 -150
cust3 1 100
cust3 2 70
cust3 3 -200
Total (net) balance for cust2 is -50 (100 + -150)
Total (net) balance for cust3 is -30 (100 + 70 + -200)
i have to aggregate the customer balance in group A (group by Cust ID)
For the Division group B, I only want to know (aggregate) all customers within that division that have a negative balance (the balance aggregate in group A).
so if i use
=sum(iif(FieldName!Balance.value < 0,FieldName!Balance.value,0))
the Total for a Division is -350 (-150 + -200)
instead of -80 (bal of cust2 + bal of cust3)
in summary, i have to aggregate the balance for each customer, base on the balance of each customer (neg bal only), i aggregate the balance for the Division