Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

hamishimrie
Contributor

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

Tags (2)
3 Replies
chauhans85
Esteemed Contributor

Count based on a "Sum IF" - Set Analysis

see below code

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

hope this helps

Not applicable

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;

}

hamishimrie
Contributor

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?



Community Browser