3 Replies Latest reply: Mar 22, 2012 9:54 AM by Hamish Imrie

# Count based on a "Sum IF" - Set Analysis

Hi,

I am not sure if this is possible - I have search the Forum....

I have the following statement that I want to expand

=count({<CompanyResponseFlag={'1'}>} distinct  CompanyID)

I need to change the "CompanyResponseFlag={'1'}" set analysis bit to include a sum if statement as following

=count(   {<    IF SUM OF THE CompanyResponseFlag is greater than one     >}               distinct  CompanyID)

Any help much appreciated

H

• ###### Count based on a "Sum IF" - Set Analysis

see below code

=count({<CompanyResponseFlag={">1"'}>} distinct  CompanyID)

hope this helps

• ###### Re: Count based on a "Sum IF" - Set Analysis

Sunil Chauhan wrote:

see below code

=count({<CompanyResponseFlag={">1"'}>} distinct  CompanyID)

hope this helps

I think he need sum(CompanyResponseFlag). If its right use:

=count({<{'\$(=sum(CompanyResponseFlag))'}={'\$(>1)'}>} distinct  CompanyID)

if ( MyEnglish == Bad ) {

Sorry;

}

• ###### Count based on a "Sum IF" - Set Analysis

Hi Semen,

Thanks very much for this.....

=count({<{'\$(=sum(CompanyResponseFlag))'}={'\$(>1)'}>} distinct  CompanyID)

I had to take the ' out of the set analysis at the front bit so the expression is

=count({<{\$(=sum(CompanyResponseFlag))}={'\$(>1)'}>} distinct  CompanyID)

However this looks at all values, how do I now make this relevant to the current selections only?