BusinessObjects Board

Count with If Else statement

Dear Sir,

I have a report requirements of counting the Account Number based on selection criteria. As below :

Data :
Account Number | Status | Total NPL
001 | P | 100
001 | N | 0
002 | P | 300
002 | N | 200
003 | P | 400

Scenario : If one Account Number has 2 statuses (P and N), only count as N to avoid double counting.

Selection Criteria used :
a) for Number of Accounts ยง : If Status = P and Total NPL <= 0, then count Account Number.
b) for Number of Accounts (N) : If Status = N and Total NPL >0, then count Account Number.

Output :
Status | Number of Accounts
P | 2
N | 1

Thank you.


onnonn (BOB member since 2003-11-03)

To get you started:

  1. Count in Business Objects Reporter is a distinct count. If you wanted to count multiple instances of an object you would use CountAll in Business Objects Reporter.

  2. Regarding your condition on when to count, please find this Reporter FAQ entry.


Andreas :de: (BOB member since 2002-06-20)