<?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: Count with Aggr() in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-with-Aggr/m-p/483197#M180573</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vishwaranjan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you expression produces the same result as mine. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Aug 2013 04:00:09 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-08-13T04:00:09Z</dc:date>
    <item>
      <title>Count with Aggr()</title>
      <link>https://community.qlik.com/t5/QlikView/Count-with-Aggr/m-p/483193#M180569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to count the numbers of IDs where certain measures satisfied required conditions. But I am unable to get the right number, can someone point me to the right direction here. Below is my current code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pick(match(d,'M1','M2','M3','M4')&lt;/P&gt;&lt;P&gt;,count(if(aggr(sum(M1),ID,Dim_01)&amp;gt;0,ID))&lt;/P&gt;&lt;P&gt;,count(if(aggr(sum(M2),ID,Dim_01)&amp;gt;0,ID))&lt;/P&gt;&lt;P&gt;,count(if(aggr(sum(M3),ID,Dim_01)&amp;gt;0,ID))&lt;/P&gt;&lt;P&gt;,count(if(aggr(sum(M4),ID,Dim_01)&amp;gt;0,ID))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 07:49:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-with-Aggr/m-p/483193#M180569</guid>
      <dc:creator />
      <dc:date>2013-08-12T07:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: Count with Aggr()</title>
      <link>https://community.qlik.com/t5/QlikView/Count-with-Aggr/m-p/483194#M180570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The numbers in your report shows count of distinct IDs . You could use NODISTINCT in the aggr function to get every ID provided your if condition is met.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pick&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;match&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;d&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'M1','M2','M3','M4')&lt;BR /&gt;&lt;BR /&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NODISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;M1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Dim_01&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;0,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&lt;BR /&gt;&lt;BR /&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NODISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;M2&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Dim_01&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;0,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&lt;BR /&gt;&lt;BR /&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NODISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;M3&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Dim_01&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;0,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&lt;BR /&gt;&lt;BR /&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NODISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;M4&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Dim_01&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;0,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&lt;BR /&gt;&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;I hope this helps!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;MultiView&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 12:15:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-with-Aggr/m-p/483194#M180570</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-12T12:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: Count with Aggr()</title>
      <link>https://community.qlik.com/t5/QlikView/Count-with-Aggr/m-p/483195#M180571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;pick(match(d,'M1','M2','M3','M4')&lt;/P&gt;&lt;P&gt;,count(distinct if(aggr(sum(M1),ID,Dim_01)&amp;gt;0,ID))&lt;/P&gt;&lt;P&gt;,count(distinct if(aggr(sum(M2),ID,Dim_01)&amp;gt;0,ID))&lt;/P&gt;&lt;P&gt;,count(distinct if(aggr(sum(M3),ID,Dim_01)&amp;gt;0,ID))&lt;/P&gt;&lt;P&gt;,count(distinct if(aggr(sum(M4),ID,Dim_01)&amp;gt;0,ID))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 12:28:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-with-Aggr/m-p/483195#M180571</guid>
      <dc:creator />
      <dc:date>2013-08-12T12:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Count with Aggr()</title>
      <link>https://community.qlik.com/t5/QlikView/Count-with-Aggr/m-p/483196#M180572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi MulitView,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What if I would like to count the number of distincts ID? I don't quite understand why I get 0 on some of the line items.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Aug 2013 03:59:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-with-Aggr/m-p/483196#M180572</guid>
      <dc:creator />
      <dc:date>2013-08-13T03:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Count with Aggr()</title>
      <link>https://community.qlik.com/t5/QlikView/Count-with-Aggr/m-p/483197#M180573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vishwaranjan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you expression produces the same result as mine. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Aug 2013 04:00:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-with-Aggr/m-p/483197#M180573</guid>
      <dc:creator />
      <dc:date>2013-08-13T04:00:09Z</dc:date>
    </item>
  </channel>
</rss>

