<?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 Count (Sub Total) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-Sub-Total/m-p/149562#M27728</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you looking to do it in your load script or as an expression in your app?&lt;/P&gt;&lt;P&gt;In the load script, I would probably use a sub-query. You would need to group by ID1 and do a Count of ID2. It doesn't really work to do that out of an Inline, but it should work on a Database or Table File.&lt;/P&gt;&lt;P&gt;To do it in an expression, I would use:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Aggr(NODISTINCT Count(DISTINCT ID2), ID1)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I've attached a sample.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jul 2009 01:21:34 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-07-17T01:21:34Z</dc:date>
    <item>
      <title>Count (Sub Total)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Sub-Total/m-p/149561#M27727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to do a count(sub total)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID1 ID2 Count&lt;/P&gt;&lt;P&gt;a 1 4&lt;/P&gt;&lt;P&gt;a 2 4&lt;/P&gt;&lt;P&gt;a 3 4&lt;/P&gt;&lt;P&gt;a 4 4&lt;/P&gt;&lt;P&gt;b 5 3&lt;/P&gt;&lt;P&gt;b 6 3&lt;/P&gt;&lt;P&gt;b 7 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the IDs, I want to to a subtotal of how many ID2 are in ID1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2009 01:07:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Sub-Total/m-p/149561#M27727</guid>
      <dc:creator />
      <dc:date>2009-07-17T01:07:35Z</dc:date>
    </item>
    <item>
      <title>Count (Sub Total)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Sub-Total/m-p/149562#M27728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you looking to do it in your load script or as an expression in your app?&lt;/P&gt;&lt;P&gt;In the load script, I would probably use a sub-query. You would need to group by ID1 and do a Count of ID2. It doesn't really work to do that out of an Inline, but it should work on a Database or Table File.&lt;/P&gt;&lt;P&gt;To do it in an expression, I would use:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Aggr(NODISTINCT Count(DISTINCT ID2), ID1)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I've attached a sample.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2009 01:21:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Sub-Total/m-p/149562#M27728</guid>
      <dc:creator />
      <dc:date>2009-07-17T01:21:34Z</dc:date>
    </item>
    <item>
      <title>Count (Sub Total)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Sub-Total/m-p/149563#M27729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a chart expression. I actually just figured it out. Count(DISTINCT TOTAL &amp;lt;ID1&amp;gt; ID2) gave the what I needed. Thanks for the reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2009 01:23:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Sub-Total/m-p/149563#M27729</guid>
      <dc:creator />
      <dc:date>2009-07-17T01:23:35Z</dc:date>
    </item>
  </channel>
</rss>

