business-objectswebi

How to count the number of occurences of a column?


I am pretty new to Webi and am having an issue creating a variable. I'm trying to check if there is more than 1 email address for each entity legacy account number and if 1 of the contact names contains "Annual Report". So when I flag each entity legacy account number for no email only the ones without a contact name that contains "Annual Report" will be pulled.

data output

In the example above only the yellow groups should be called no email. Right now all of them are being pulled into no email. I have tried using if and match as those are what I am most familiar with.

Any suggestions?


Solution

  • There are number of ways you could do this. I am going to give an example using two variables, but you could easily combine them into one.

    Has No Email Var=If(Match(Upper([Contact EmailAddress]); "NOEMAIL*"); 1; 0)
    Annual Report Contact Name Var=If(Match(Upper([Contact Name]); "ANNUAL REPORT*"); 1; 0)
    

    Then you would apply a report filter with two components...

    Has No Email Var = 1 
    AND
    Annual Report Contact Name Var = 0
    

    Let me explain a few things...

    Hope this helps,

    Noel