<?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 Performance issue with aggr function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Performance-issue-with-aggr-function/m-p/794342#M534411</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 am facing some severe performance issues while using aggr function in a straight table.&lt;/P&gt;&lt;P&gt;I am calculating a Product Share column in its Category when the Product is selected using aggr function as below:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;&lt;STRONG&gt;Sum(Sales) / aggr(NODISTINCT Sum(Sales),Product_Category)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After putting this expression, the RAM consumption spikes up exponentially and consumes all the available RAM on my local.&lt;/P&gt;&lt;P&gt;I am developing on my local with a reduced data of 40 MB, and without this expression the total RAM consumption is 300 MB. &lt;/P&gt;&lt;P&gt;After adding this expression, the RAM consumption goes to 2500 MB and i have to restart my system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there any alternatives how we can rewrite this expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Diwakar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Feb 2015 12:01:54 GMT</pubDate>
    <dc:creator>diwakarnahata</dc:creator>
    <dc:date>2015-02-12T12:01:54Z</dc:date>
    <item>
      <title>Performance issue with aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-issue-with-aggr-function/m-p/794342#M534411</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 am facing some severe performance issues while using aggr function in a straight table.&lt;/P&gt;&lt;P&gt;I am calculating a Product Share column in its Category when the Product is selected using aggr function as below:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;&lt;STRONG&gt;Sum(Sales) / aggr(NODISTINCT Sum(Sales),Product_Category)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After putting this expression, the RAM consumption spikes up exponentially and consumes all the available RAM on my local.&lt;/P&gt;&lt;P&gt;I am developing on my local with a reduced data of 40 MB, and without this expression the total RAM consumption is 300 MB. &lt;/P&gt;&lt;P&gt;After adding this expression, the RAM consumption goes to 2500 MB and i have to restart my system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there any alternatives how we can rewrite this expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Diwakar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2015 12:01:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-issue-with-aggr-function/m-p/794342#M534411</guid>
      <dc:creator>diwakarnahata</dc:creator>
      <dc:date>2015-02-12T12:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-issue-with-aggr-function/m-p/794343#M534412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Diwakar, maybe:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;Sum(Sales) /Sum(TOTAL &amp;lt;&lt;SPAN style="color: #575757;"&gt;Product_Category&amp;gt; Sales)&lt;/SPAN&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2015 12:05:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-issue-with-aggr-function/m-p/794343#M534412</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-02-12T12:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-issue-with-aggr-function/m-p/794344#M534413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ruben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;I need to put some filter conditions like &lt;STRONG&gt;WeekID={'&amp;gt;$(=max(WeekId)-52)'},Product_SubCategory=,&lt;/STRONG&gt; etc. before the TOTAL &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Product_Category&amp;gt; expression. How should the final expression be?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The AGGR expression was like:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Sum(Sales) /&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;aggr(NODISTINCT Sum({$&amp;lt;Product_SubCategory=,WeekID={'&amp;gt;$(=max(WeekId)-52)'}}&amp;gt;} Sales),&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Product_Category&lt;/SPAN&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, the &lt;STRONG&gt;WHERE&lt;/STRONG&gt; condition filters are to be applied before it is aggregated using TOTAL or AGGR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Diwakar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2015 13:18:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-issue-with-aggr-function/m-p/794344#M534413</guid>
      <dc:creator>diwakarnahata</dc:creator>
      <dc:date>2015-02-16T13:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-issue-with-aggr-function/m-p/794345#M534414</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;You are using Aggr() incorrectly. Aggr() returns a array of values which is usually fed directly to an aggregation function , like Sum() or Max(). QV is getting confused by the expression that you have supplied and is running out of memory while trying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ruben's answer is correct for your original post, but now you have changed your requirement from the original post and this is a different question, which should be in new thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2015 13:24:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-issue-with-aggr-function/m-p/794345#M534414</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-02-16T13:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-issue-with-aggr-function/m-p/794346#M534415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Diwakar, you can add the 'where' condition with the TOTAL qualifier:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;Sum(Sales) /Sum(TOTAL &amp;lt;&lt;SPAN style="color: #575757;"&gt;Product_Category&amp;gt; {$&amp;lt;Product_SubCategory=,WeekID={'&amp;gt;$(=max(WeekId)-52)'}}&amp;gt;}&lt;STRONG&gt;&amp;nbsp; &lt;/STRONG&gt;Sales)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;As Jonathan saids, aggr returns more than one vuale (one for each Product_Category in this case), if you want to use aggr it can be something like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum(Sales) /&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(&lt;/STRONG&gt;aggr(NODISTINCT Sum({$&amp;lt;Product_SubCategory=,WeekID={'&amp;gt;$(=max(WeekId)-52)'}}&amp;gt;} Sales),&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Product_Category&lt;/SPAN&gt;)&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2015 13:42:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-issue-with-aggr-function/m-p/794346#M534415</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-02-16T13:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-issue-with-aggr-function/m-p/794347#M534416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Diwakar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this might help :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-weight: inherit;"&gt;Product_Category&lt;/STRONG&gt;=P(&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-weight: inherit;"&gt;Product_Category&lt;/STRONG&gt;),&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Product_SubCategory&lt;/STRONG&gt;=,WeekId={'&amp;gt;$(=max(WeekId)-(52))'}&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 12:16:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-issue-with-aggr-function/m-p/794347#M534416</guid>
      <dc:creator>punitpopli</dc:creator>
      <dc:date>2015-02-20T12:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-issue-with-aggr-function/m-p/794348#M534417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Punit, it worked perfectly!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 12:19:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-issue-with-aggr-function/m-p/794348#M534417</guid>
      <dc:creator>diwakarnahata</dc:creator>
      <dc:date>2015-02-20T12:19:05Z</dc:date>
    </item>
  </channel>
</rss>

