Summary
How to sum values with condition in current group bi publisher
Content
what is the correct syntax for this :
<?sum(current-group()/SUM_COS_COSTED_VALUE_[../DEBIT_OR_CREDIT='C']) - SUM_COS_COSTED_VALUE_[../DEBIT_OR_CREDIT='D'] )?>
I want for each CAK_SEGMENT2_ to sum the field (SUM_COS_COSTED_VALUE_) where DEBIT_OR_CREDIT='C' - (SUM_COS_COSTED_VALUE_) where DEBIT_OR_CREDIT='D'
I can get the sum of debits this way <?sum(SUM_COS_COSTED_VALUE_[../DEBIT_OR_CREDIT='D'])?> , similarly, the sum of credits, but when I try to get this for each CAK_SEGMENT2_ I get error unknown expression.