<?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: Aggr() Count help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-Count-help/m-p/689534#M249652</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! Great use of sum rather than count().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Jun 2014 19:47:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-06-16T19:47:52Z</dc:date>
    <item>
      <title>Aggr() Count help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-help/m-p/689531#M249649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working with telecommunication/wireless telephone data, and I want to count the number of "Inactive" lines in a text box. What I've done so far is aggr() each phone line ("PhoneLineNumber" below) by the sum of their data + voice usage. Now what I want to do is count the numbers whenever that Aggr() expression evaluates to zero. How do I count those? Set analysis? If statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr(sum(UsageDataKBTotal) + sum(UsageTotalVoiceMOU), PhoneLineNumber)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 19:42:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-help/m-p/689531#M249649</guid>
      <dc:creator />
      <dc:date>2014-06-16T19:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() Count help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-help/m-p/689532#M249650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=sum( &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;aggr(if(sum(UsageDataKBTotal) + sum(UsageTotalVoiceMOU)=0,1), PhoneLineNumber)&lt;/SPAN&gt; )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 19:43:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-help/m-p/689532#M249650</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-06-16T19:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() Count help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-help/m-p/689533#M249651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Didn't understand your question properly. Could you please elaborate little more?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 19:44:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-help/m-p/689533#M249651</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-06-16T19:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() Count help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-help/m-p/689534#M249652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! Great use of sum rather than count().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 19:47:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-help/m-p/689534#M249652</guid>
      <dc:creator />
      <dc:date>2014-06-16T19:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() Count help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-help/m-p/689535#M249653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What if I only wanted to do the same as above, but only count the phone numbers of a certain length - such as where len(PhoneLineNumber) = 7? Is that possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 20:05:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-help/m-p/689535#M249653</guid>
      <dc:creator />
      <dc:date>2014-06-16T20:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() Count help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-help/m-p/689536#M249654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, maybe like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count( if(len(PhoneLineNumber)=7,PhoneLineNumber))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or a distinct count if needed:&lt;/P&gt;&lt;P&gt;=count(DISTINCT if(len(PhoneLineNumber)=7,PhoneLineNumber))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or prepare a field PhoneLineNumberLength in your script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PhoneLineNumber,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; len(PhoneLineNumber) as PhoneLineNumberLength,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;=count(DISTINCT {&amp;lt;PhoneLineNumberLength = {7}&amp;gt;} PhoneLineNumber)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 20:26:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-help/m-p/689536#M249654</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-06-16T20:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() Count help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-help/m-p/689537#M249655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mean inside the formula you provided above. Something like (although this doesn't work):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum( if(aggr(sum(UsageDataKBTotal) + sum(UsageTotalVoiceMOU), if(Len(PhoneLineNumber) = 12, PhoneLineNumber)) = 0, 1))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 20:41:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-help/m-p/689537#M249655</guid>
      <dc:creator />
      <dc:date>2014-06-16T20:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() Count help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-help/m-p/689538#M249656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I actually got it! Thanks for the help again:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum( if(Len(PhoneLineNumber) = 12 AND aggr(sum(UsageDataKBTotal) + sum(UsageTotalVoiceMOU), PhoneLineNumber) = 0, 1))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 20:45:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-help/m-p/689538#M249656</guid>
      <dc:creator />
      <dc:date>2014-06-16T20:45:37Z</dc:date>
    </item>
  </channel>
</rss>

