Sunday, June 22, 2014

To get conditional Sum in BI reporting

In some cases, we need to get the sum of values of a column depending on the values of other column in BI reporting.

For that case, we can do that in a simple way of one line of code as:

<? sum(current-group()/LCY_BAL[../IS_LEAF='Y']) ?> 

In the above code we have get the sum of LCY_BAL field group wise. And the condition for this sum has been implemented in [../IS_LEAF='Y'] . This condition will filter the sum according to the case it supports.


No comments: