<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sum and count in same expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195388#M385660</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Aggr(if(count(log_id_pk) &amp;gt; 5, 1, 0),&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;log_id_pk&lt;/SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum({&amp;lt;log_id_pk = {"=Count(log_id_pk)&amp;gt;5"}&amp;gt;} DISITNCT &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;log_id_pk&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Hope this helps you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Regars,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Sep 2016 07:05:44 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2016-09-30T07:05:44Z</dc:date>
    <item>
      <title>Sum and count in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195380#M385652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope all is well with everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are trying to do sum and count of in the same expression but are not getting it right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have devices&amp;nbsp; (log_tun_id) and for each device we have number of packets (log_id_pk). What we want to do is for each device (log_tun_id) we would like to show how many times the packets (log_id_pk) is greater than certain value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using the following expression but it is not working.&amp;nbsp; Seems like Sum and count does not work in the same expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension: log_tun_id&lt;/P&gt;&lt;P&gt;Expression: Sum(if(count log_id_pk &amp;gt; 5, 1, 0) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will appreciate if someone can assist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Syed Jawwad Hussain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Syed Jawwad Hussain&#xD;
&#xD;
Sorry actually the requirements was quoted wrong to me.  The following are the correct requirements.&#xD;
&#xD;
* The count of log_id_pk for each device (tun_id_pk) should be equal to 15&#xD;
* We want to find out the number of days when the count of log_id_pk for each tun_id_pk &amp;gt; 15&#xD;
* Selecting the device should give us the list of days and the count where the count has been greater than 15&#xD;
&#xD;
What i have tried is the following:&#xD;
&#xD;
dimension: log_tun_id&#xD;
expression: sum(aggr(if(count(log_id_pk)&amp;gt;3,1,0), datetimeindata_date, log_tun_id))&#xD;
&#xD;
And it seems to be working fine.&#xD;
&#xD;
Thanks to all for the assistance as it really helped me to do the expression &#xD;
&#xD;
&#xD;
&#xD;
&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 06:29:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195380#M385652</guid>
      <dc:creator>sjhussain</dc:creator>
      <dc:date>2016-09-30T06:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and count in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195381#M385653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM(aggr(count(if(log_id_pk &amp;gt; 5,log_tun_id)),log_tun_id)) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 06:33:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195381#M385653</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2016-09-30T06:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and count in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195382#M385654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to use advanced aggregation if you want to embed a count in a another aggregation function. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But maybe this is sufficient?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum( log_id_pk &amp;gt;5 ) *-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or using advanced aggrgegation:&lt;/P&gt;&lt;P&gt;Sum( Aggr( Sum(If( Log_id_pk &amp;gt;5,1)), log_tun_id))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 06:35:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195382#M385654</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-09-30T06:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and count in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195383#M385655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the quick response.&amp;nbsp; Our QV server is down at the moment and i will try as soon as it is up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why do we have to use the aggregate function? it could not work with simple sum(if(count condition),1,0)?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also can you briefly explain the aggr function as i get confused whether to use it inside the count or outside.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 06:40:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195383#M385655</guid>
      <dc:creator>sjhussain</dc:creator>
      <dc:date>2016-09-30T06:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and count in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195384#M385656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your quick response. Our server is down at the moment and i will enter your expression as soon as it is up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=Sum( log_id_pk &amp;gt;5 ) *-1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;- Actually we have Raw Transaction Table so we cannot aggregate the counts as we have to use them for other expressions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;- What is the purpose of *-1? after summation?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Thanks.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 06:43:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195384#M385656</guid>
      <dc:creator>sjhussain</dc:creator>
      <dc:date>2016-09-30T06:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and count in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195385#M385657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=Sum( log_id_pk &amp;gt;5 ) *-1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;- Actually we have Raw Transaction Table so we cannot aggregate the counts as we have to use them for other expressions.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;- What is the purpose of *-1? after summation?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Could you elaborate on your first statement? How does your data model look like? Could you post some sample records?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Referring to the second question: when executing&amp;nbsp; log_id_pk &amp;gt;5 on row level, a boolean value is returned TRUE or FALSE, or in numeric representation -1 or 0. Summing up the TRUE values returns a negative value, hence you would need to multiply with -1 (or use fabs() ) to get your positive value equal to a count of rows where log_id_pk &amp;gt;5&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 06:48:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195385#M385657</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-09-30T06:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and count in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195386#M385658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you cant use two aggregation functions like Count and sum in one Expression.&lt;/P&gt;&lt;P&gt;There is were the aggr() Comes into Play. the aggr function created a temporary table of Content.&lt;/P&gt;&lt;P&gt;in this example aggr(count(if(log_id_pk &amp;gt; 5,log_tun_id)),log_tun_id) creates a table like this&lt;/P&gt;&lt;P&gt;Log_tun_id&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(if(log_id_pk&amp;gt;5, log_tun_id))&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now we want to get the sum of this, so we surround the Expression above with sum().&lt;/P&gt;&lt;P&gt;-&amp;gt; sum(&amp;nbsp; aggr(count(if(log_id_pk &amp;gt; 5,log_tun_id))&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 06:51:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195386#M385658</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2016-09-30T06:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and count in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195387#M385659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Syed:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;log_id_pk = {"=Count(log_id_pk)&amp;gt;5"}&amp;gt;} 1)&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 06:58:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195387#M385659</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-30T06:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and count in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195388#M385660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Aggr(if(count(log_id_pk) &amp;gt; 5, 1, 0),&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;log_id_pk&lt;/SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum({&amp;lt;log_id_pk = {"=Count(log_id_pk)&amp;gt;5"}&amp;gt;} DISITNCT &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;log_id_pk&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Hope this helps you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Regars,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 07:05:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195388#M385660</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2016-09-30T07:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and count in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195389#M385661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried your suggestion but it is not working.&amp;nbsp; It is giving all zeros.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to switch the count and the if - s&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;um(&amp;nbsp; aggr(if(count(log_id_pk &amp;gt; 5),log_tun_id))&amp;nbsp; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it is not working properly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 07:55:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195389#M385661</guid>
      <dc:creator>sjhussain</dc:creator>
      <dc:date>2016-09-30T07:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and count in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195390#M385662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please try&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Aggr(if(count(log_id_pk) &amp;gt; 5, 1, 0),&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;log_id_pk&lt;/SPAN&gt;))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 08:01:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195390#M385662</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2016-09-30T08:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and count in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195391#M385663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried from Script? Would you be able to provide sample&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 08:02:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195391#M385663</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-09-30T08:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and count in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195392#M385664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt;Try this expression...&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10.6667px;"&gt;sum&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10.6667px;"&gt;aggr&lt;/SPAN&gt;(if(count(&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;log_id_pk&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; &lt;/SPAN&gt;])&amp;gt;5,1,0),&lt;SPAN style="color: #800000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10.6667px;"&gt;log_tun_id&lt;/SPAN&gt;,&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;log_id_pk&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; &lt;/SPAN&gt;))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 09:28:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195392#M385664</guid>
      <dc:creator>rajpreeths</dc:creator>
      <dc:date>2016-09-30T09:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and count in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195393#M385665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your expression but it is not working.&amp;nbsp; It is just giving me zeros.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10.6667px;"&gt;I even changed log_id_pk to tun_id_pk - Sum(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Aggr(if(count(log_id_pk) &amp;gt; 5, 1, 0),&amp;nbsp; tun_id_pk))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyother ideas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 11:08:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195393#M385665</guid>
      <dc:creator>sjhussain</dc:creator>
      <dc:date>2016-09-30T11:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and count in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195394#M385666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This expression &lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Sum(Aggr(if(count(log_id_pk) &amp;gt; 5, 1, 0), tun_id_pk))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is syntactically correct for the information you have supplied. If that is not working, there is some other factor coming into play. If you upload a small sample qvw file together with the results you expect, then we can do more than just make wild guesses at the solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 11:30:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195394#M385666</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-09-30T11:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and count in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195395#M385667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have added the data to the query.&amp;nbsp; Let me know if you are able to find it.&amp;nbsp; Also we are looking for count &amp;gt; 1440.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the assistance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 11:48:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1195395#M385667</guid>
      <dc:creator>sjhussain</dc:creator>
      <dc:date>2016-09-30T11:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Sum and count in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1571941#M442201</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/32098"&gt;@sjhussain&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/14931"&gt;@jonathandienst&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/16537"&gt;@rajpreeths&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/5533"&gt;@Anil_Babu_Samineni&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/2752"&gt;@zhadrakas&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello, I have a similar question on this forum:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/New-to-Qlik-Sense/Display-Pie-Chart-with-the-Count-of-some-data-values-in-one/m-p/1571326#M133232" target="_blank"&gt;https://community.qlik.com/t5/New-to-Qlik-Sense/Display-Pie-Chart-with-the-Count-of-some-data-values-in-one/m-p/1571326#M133232&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering how could I Sum the Count of several different values (by specifying which ones I want to Sum) to obtain the total percentage in a pie chart.&lt;/P&gt;&lt;P&gt;Does anyone here know how to help? I would really appreciate it.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 09:08:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-and-count-in-same-expression/m-p/1571941#M442201</guid>
      <dc:creator>ritaaguiar</dc:creator>
      <dc:date>2019-04-23T09:08:32Z</dc:date>
    </item>
  </channel>
</rss>

