<?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() , RANK() Optimization in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968033#M331655</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you chk if Aggr is properly working, I am not sure how it is generating virtual table of top 5 values used to sum top 5, shouldn't it end after rank comparison? Like IF(aggr(Rank(sum(Value)),Dim)&amp;lt;=3. Please ignore if its irrelevant as at my level its tough to identify without actually testing it. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Sep 2015 13:12:30 GMT</pubDate>
    <dc:creator>Digvijay_Singh</dc:creator>
    <dc:date>2015-09-03T13:12:30Z</dc:date>
    <item>
      <title>Aggr() , RANK() Optimization</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968025#M331647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Expert, &lt;/P&gt;&lt;P&gt;In a State wise Table , i am trying to calculate TRADE_VALUE of a particular Member and long with comparing TOP 5 Members of that State according to TRADE_VALUE and getting out the position of a selected Member from TOP 5 Members.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=((Sum({&amp;lt;RM_REGION=,CLIENTTYPE_NEW={'RETAIL'}&amp;gt;} TRADE_VALUE) / vmaxDay))/ sum({1} aggr( if(rank((Sum({&amp;lt;MEMBER_NAME=,RM_REGION=,CLIENTTYPE_NEW={'RETAIL'}&amp;gt;}TRADE_VALUE)/vmaxDay))&amp;lt;=5, (Sum({&amp;lt;MEMBER_NAME=,RM_REGION=,CLIENTTYPE_NEW={'RETAIL'}&amp;gt;}TRADE_VALUE)/vmaxDay)), STATENAME_CLNT, MEMBERID))*5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BELOW I SEPARATED THE QUERY TO UNDERSTAND IT BETTER. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Getting TRADE_VALUE&lt;/P&gt;&lt;P&gt;((Sum({&amp;lt;RM_REGION=,CLIENTTYPE_NEW={'RETAIL'}&amp;gt;} TRADE_VALUE) / vmaxDay))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)&amp;nbsp; GETTING TOP 5 MEMBERS TRADE_VALUE OF SAME STATE DIMENSIONS &lt;/P&gt;&lt;P&gt;sum({1} aggr( if(rank((Sum({&amp;lt;MEMBER_NAME=,RM_REGION=,CLIENTTYPE_NEW={'RETAIL'}&amp;gt;}TRADE_VALUE)/vmaxDay))&amp;lt;=5, (Sum({&amp;lt;MEMBER_NAME=,RM_REGION=,CLIENTTYPE_NEW={'RETAIL'}&amp;gt;}TRADE_VALUE)/vmaxDay)), STATENAME_CLNT, MEMBERID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)&lt;/P&gt;&lt;P&gt;DIVIDING 1 AND 2 AND MULTIPLYING BY 5&lt;/P&gt;&lt;P&gt;SELECTIONS &lt;/P&gt;&lt;P&gt;MEMBER SELECTED : XYZ&lt;/P&gt;&lt;P&gt;MONTH-YEAR : SEKECTED&lt;/P&gt;&lt;P&gt;RM_REGION : &amp;lt;MAY SELECTED SO EXCLUDED&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THE OUTPUT IS WORKING FINE, BUT ISSUE IS ITS TAKING LOTS OF TIME IN PROCESSING CAN WE HAVE ANY BETTER WAY ( EXCEPT LOAD TIME CALCULATION ) &lt;/P&gt;&lt;P&gt;&lt;IMG alt="TOP5 aGGR().png" class="jive-image image-1" src="/legacyfs/online/97872_TOP5 aGGR().png" style="height: 195px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 11:49:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968025#M331647</guid>
      <dc:creator />
      <dc:date>2015-09-03T11:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() , RANK() Optimization</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968026#M331648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi jitendra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My assumption is that you are doing complex caliculations in UI level, do them in Script level then you won't find any optimezation issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ganesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 12:04:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968026#M331648</guid>
      <dc:creator>ganeshreddy</dc:creator>
      <dc:date>2015-09-03T12:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() , RANK() Optimization</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968027#M331649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mean aggrigating in script level with group by. I hope its cleared.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 12:06:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968027#M331649</guid>
      <dc:creator>ganeshreddy</dc:creator>
      <dc:date>2015-09-03T12:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() , RANK() Optimization</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968028#M331650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reddy, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you Reply. &lt;/P&gt;&lt;P&gt;Actually doing UI level provide me flexibility to easily change the logic like:&lt;/P&gt;&lt;P&gt;currently it is STATE level in future i can make it as CITY level also. &lt;/P&gt;&lt;P&gt;Current there is calculation of RETAIL business only ( as you can see in SET Analysis) but in future if we required another column of other Business Type also.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in all that cases i needs to manage all the possibe condition at Script level only..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jitendra K Vishwakarma &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 12:11:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968028#M331650</guid>
      <dc:creator />
      <dc:date>2015-09-03T12:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() , RANK() Optimization</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968029#M331651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you used the individual statements in a text object, which one is taking long time to calculate?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 12:20:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968029#M331651</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-09-03T12:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() , RANK() Optimization</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968030#M331652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jitender,&lt;/P&gt;&lt;P&gt;Atleast try to do that main TRADE_VALUE caliculation in Script level, later you can have a felxibily while doing Ctiy levelcaliculations with aggr() or adding more businesses or so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ganesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 12:24:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968030#M331652</guid>
      <dc:creator>ganeshreddy</dc:creator>
      <dc:date>2015-09-03T12:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() , RANK() Optimization</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968031#M331653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;i have to check that. but all other columns are just basic SUM() Expression even there is no distinct count also. i have also check by removing this particular expression its work fine.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have notice that aggr() or rank() type of expression maybe run on one CPU only its not utilized the whole CPU power.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 12:24:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968031#M331653</guid>
      <dc:creator />
      <dc:date>2015-09-03T12:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() , RANK() Optimization</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968032#M331654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reddy, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But once i made TRADE_VALUE on a particular Dimension then that TRADE_VALUE can work on specific Dimension only. then i cannot derived more Business information out of that. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope you can understand and yes if the performance is not going to improve i am going to do that only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 12:28:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968032#M331654</guid>
      <dc:creator />
      <dc:date>2015-09-03T12:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() , RANK() Optimization</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968033#M331655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you chk if Aggr is properly working, I am not sure how it is generating virtual table of top 5 values used to sum top 5, shouldn't it end after rank comparison? Like IF(aggr(Rank(sum(Value)),Dim)&amp;lt;=3. Please ignore if its irrelevant as at my level its tough to identify without actually testing it. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 13:12:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-RANK-Optimization/m-p/968033#M331655</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-09-03T13:12:30Z</dc:date>
    </item>
  </channel>
</rss>

