<?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 Aggr Count Help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290980#M108022</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same result as in your table above! The COUNT is also correct (in table above is wrong).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 May 2011 17:25:26 GMT</pubDate>
    <dc:creator>rbecher</dc:creator>
    <dc:date>2011-05-11T17:25:26Z</dc:date>
    <item>
      <title>Aggr Count Help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290974#M108016</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 need an help with Aggr count, I have attached a sample &amp;amp; explained my requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks In Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 13:28:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290974#M108016</guid>
      <dc:creator />
      <dc:date>2011-05-11T13:28:26Z</dc:date>
    </item>
    <item>
      <title>Aggr Count Help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290975#M108017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your example doesn't really make a lot of sense.&amp;nbsp; You already have the answer for the first column and I'm not sure how you are supposed to get 2 7's, a 5, and a 2 with those 10 rows loaded for the second column.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 14:34:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290975#M108017</guid>
      <dc:creator />
      <dc:date>2011-05-11T14:34:04Z</dc:date>
    </item>
    <item>
      <title>Aggr Count Help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290976#M108018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BRAND 2 is used by :&lt;/P&gt;&lt;P&gt;- ACCT A&lt;/P&gt;&lt;P&gt;- ACCT B (two times)&lt;/P&gt;&lt;P&gt;- ACCT C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ACCT A uses BRAND 1 and BRAND 2 : 2 brands&lt;/P&gt;&lt;P&gt;ACCT B uses BRAND 1 and BRAND 2 and BRAND 3 : 3 brands. Even if ACCT B uses 2 times BRAND 2, it have to be counted only 1 time.&lt;/P&gt;&lt;P&gt;ACCT C uses BRAND 2 and BRAND 3 : 2 brands&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, BRAND 2 is used by ACCT that use 2+3+2 = 7 brands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This in an interesting problem...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For me, the "simpliest" solution is to calculate the expected values in the load script, creating specific tables / columns.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 14:48:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290976#M108018</guid>
      <dc:creator />
      <dc:date>2011-05-11T14:48:51Z</dc:date>
    </item>
    <item>
      <title>Aggr Count Help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290977#M108019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any help please....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 17:08:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290977#M108019</guid>
      <dc:creator />
      <dc:date>2011-05-11T17:08:37Z</dc:date>
    </item>
    <item>
      <title>Aggr Count Help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290978#M108020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=sum(aggr(count({1} distinct ACCT),[BRAND ID]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 17:17:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290978#M108020</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2011-05-11T17:17:25Z</dc:date>
    </item>
    <item>
      <title>Aggr Count Help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290979#M108021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;its not working....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 17:23:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290979#M108021</guid>
      <dc:creator />
      <dc:date>2011-05-11T17:23:23Z</dc:date>
    </item>
    <item>
      <title>Aggr Count Help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290980#M108022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same result as in your table above! The COUNT is also correct (in table above is wrong).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 17:25:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290980#M108022</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2011-05-11T17:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Count Help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290981#M108023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want an expression for "# Brands Purchased BY these accounts ". Please see attached image... hope you understand my question...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 17:55:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290981#M108023</guid>
      <dc:creator />
      <dc:date>2011-05-11T17:55:28Z</dc:date>
    </item>
    <item>
      <title>Aggr Count Help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290982#M108024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This makes no sense. Brands purchased by WHICH accounts? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Btw. the dimension is Brand not Account!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 18:13:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290982#M108024</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2011-05-11T18:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Count Help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290983#M108025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I clearly mentioned requirement in my attached files and also please look @ nmartin's reply...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg: for "BRAND 1"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Accts bought "Brand 1" are 2 (Accts: A &amp;amp; B).&lt;/P&gt;&lt;P&gt;# Brands also bought (including Brand 1) by these accts are 5 (Distinct Brands from Acct A = 2 + Distinct Brands from Acct B = 3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note_1: Acct B bought BRAND 2 twice but It should consider it only once. i.e distinct brands by acct.&lt;/P&gt;&lt;P&gt;Note_2: User also have option to select Acct as Dimension, in that case how it is handled.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 19:00:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290983#M108025</guid>
      <dc:creator />
      <dc:date>2011-05-11T19:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Count Help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290984#M108026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You cannot break out of the dimension context (Brand).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe the only solution is a precalculation of this figure as @nmartin wrote...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 20:01:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290984#M108026</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2011-05-11T20:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Count Help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290985#M108027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems to do the trick.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum(aggr(count({&amp;lt;"BRAND ID"=&amp;gt;} total &amp;lt;"ACCT"&amp;gt; distinct "BRAND ID"),"BRAND ID","ACCT"))&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Edit: Added set analysis to fix bug where if you selected a single row, the value changed.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 00:09:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290985#M108027</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-05-12T00:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Count Help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290986#M108028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is brilliant John!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can this count work with a different dimensionality?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 09:28:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290986#M108028</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2011-05-12T09:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Count Help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290987#M108029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John... Perfect that's what I am looking for.... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 15:57:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290987#M108029</guid>
      <dc:creator />
      <dc:date>2011-05-12T15:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Count Help</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290988#M108030</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;@TIQView - Ralf Becher wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can this count work with a different dimensionality?&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, ignore the sum(), replace the aggr() with a table, and get rid of the set analysis for the moment.&amp;nbsp; That gives us this hopefully more understandable case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;dimension 1 = BRAND ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;dimension 2 = ACCT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;expression&amp;nbsp; = count(total &amp;lt;"ACCT"&amp;gt; distinct "BRAND ID")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's exactly how I started.&amp;nbsp; Now, I wasn't certain it would work, but I thought it might, and it did.&amp;nbsp; What seems to be happening is that since we have account after brand in the dimensions, we only look at the accounts for the brand for that row.&amp;nbsp; However, in the count(), we tell it 'total &amp;lt;"ACCT"&amp;gt;', which says to ignore the brand.&amp;nbsp; It ends up paying attention to the brand for the selection of accounts, but then ignoring the brand for the count of brands.&amp;nbsp; That's exactly what we needed.&amp;nbsp; Then it's just a matter of converting this temporary table into an aggr() by putting our two dimensions in the aggr(), summing up, and finally using set analysis to make sure that when we select one specific brand, it doesn't only count that brand.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 16:42:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Count-Help/m-p/290988#M108030</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-05-12T16:42:14Z</dc:date>
    </item>
  </channel>
</rss>

