Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

3 Replies
SunilChauhan
Champion II
Champion II

see below code

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

hope this helps

Sunil Chauhan
Not applicable
Author

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;

}

Anonymous
Not applicable
Author

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?