<?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 and ignoring selections in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-and-ignoring-selections/m-p/1045920#M351588</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stupid me.&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;Assets.Class=&amp;gt;} ClientID)&lt;/P&gt;&lt;P&gt;in the expressions solves the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Apr 2016 11:28:10 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-04-29T11:28:10Z</dc:date>
    <item>
      <title>Aggr and ignoring selections</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-ignoring-selections/m-p/1045919#M351587</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;I have a problem - the aggr function does not EVER take into account elements of the dimension excluded by some other selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to distribute the client count into ranges like '0%', '10%, '&amp;gt;10%'. These ranges represent the &lt;EM&gt;part&lt;/EM&gt; of the &lt;STRONG&gt;selected&lt;/STRONG&gt; Asset Class inside the client portfolio.&lt;/P&gt;&lt;P&gt;So, if I select Equity as the Asset Class, I want to see how many clients have 10% (or 0, or &amp;gt;10%) of their portfolio in Equity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My chart contains a dimension - an aggr similar to this:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;=Aggr(&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( sum(CBV) / sum({$&amp;lt;Assets.Class=&amp;gt;} Total&amp;lt;ClientID&amp;gt; CBV) &amp;lt;=0,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0%',&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( sum(CBV) / sum({$&amp;lt;Assets.Class=&amp;gt;} Total&amp;lt;ClientID&amp;gt; CBV) &amp;lt;=0.1,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '10%',&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '&amp;gt;10%'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )),&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ClientID&lt;BR /&gt;&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;Then in the expression it simply does count(ClientID).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The total chart count of clients should be equal to the actual total of clients.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it is not: when the Assets.Class gets selected, some (or sometimes many) clients get obviously excluded.&lt;/P&gt;&lt;P&gt;So, the chart total sometimes gives 1, sometimes 100, sometimes 45 out of 100 clients.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can this be solved so that the missing clients would be treated as having 0% of the asset class? &lt;/P&gt;&lt;P&gt;The actual problem is: can the Aggr function do the calculation on ALL the values of the filtered dimension?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 11:25:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-and-ignoring-selections/m-p/1045919#M351587</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-29T11:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr and ignoring selections</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-ignoring-selections/m-p/1045920#M351588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stupid me.&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;Assets.Class=&amp;gt;} ClientID)&lt;/P&gt;&lt;P&gt;in the expressions solves the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 11:28:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-and-ignoring-selections/m-p/1045920#M351588</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-29T11:28:10Z</dc:date>
    </item>
  </channel>
</rss>

