<?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: Need help in aggr function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329608#M576588</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attache d one file .please check is correct or not .&lt;/P&gt;&lt;P&gt;i thing useful for u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Perumal A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Mar 2012 08:34:00 GMT</pubDate>
    <dc:creator>perumal_41</dc:creator>
    <dc:date>2012-03-30T08:34:00Z</dc:date>
    <item>
      <title>Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329607#M576587</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;Actually i have a problem in straight table chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Top N.JPG" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/12580_Top+N.JPG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;a&amp;gt;&lt;/P&gt;&lt;P&gt;In this app when i enter the variable as 7 , it is showing the top 6 sum(sales), but in the total row it is showing the total of all the rows (86000) instead of 66000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attched the application, as it is having inline data all can reload this app.&lt;/P&gt;&lt;P&gt;b&amp;gt;&lt;/P&gt;&lt;P&gt;I have also a second requirement i need the % Contribution of Top N "Sum(Sales)" against the Sum(Total sales).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried the Set expression but it is not working&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Dept={"aggr(if(rank(sum(Sales))&amp;lt;=$(V1),Dept),Name,Dept,ID)"}&amp;gt;}Sales) / Sum(TOTAL Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here i need the %Contribution of Sum(Sales) of Top V1 Dept against Sum(Total Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me solving this and let me know if any queries regarding understanding the requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 07:33:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329607#M576587</guid>
      <dc:creator>sunil2288</dc:creator>
      <dc:date>2012-03-30T07:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329608#M576588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attache d one file .please check is correct or not .&lt;/P&gt;&lt;P&gt;i thing useful for u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Perumal A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 08:34:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329608#M576588</guid>
      <dc:creator>perumal_41</dc:creator>
      <dc:date>2012-03-30T08:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329609#M576589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp; Perumal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Great Work this what it should be &lt;/P&gt;&lt;P&gt;nice work !!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Warm Regards&lt;/P&gt;&lt;P&gt;Anant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 09:41:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329609#M576589</guid>
      <dc:creator />
      <dc:date>2012-03-30T09:41:53Z</dc:date>
    </item>
    <item>
      <title>Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329610#M576590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Perumal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Sum(Aggr(if(rank(sum(Sales))&amp;lt;=V1,sum(Sales)),ID))"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. Actually here we have a field which is Unique and not null (i.e. ID). But in real scenario what i am facing is : ID is not unique. Rather the combination of all the fields make a row unique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Data is like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name, Dept, ID, Sales&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A, aa, 1001, 5000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; B, bb, 1002, 2000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C, cc, 1003, 3000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; D, dd, 1004, 4000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; E, aa, 1005, 1000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; F, bb, 1006, 5000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; G, cc, 1007, 6000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; H, dd, 1009, 10000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I, aa, 1009, 14000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; J, bb, 1010, 12000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; K, cc, 1010, 9000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; L, dd, 1012, 8000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; M, aa, 1013, 7000&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope u will be able to understand my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 13:20:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329610#M576590</guid>
      <dc:creator>sunil2288</dc:creator>
      <dc:date>2012-03-30T13:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329611#M576591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Perumal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Sum(Aggr(if(rank(sum(Sales))&amp;lt;=V1,sum(Sales)),ID))"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. Actually here we have a field which is Unique and not null (i.e. ID). But in real scenario what i am facing is : ID is not unique. Rather the combination of all the fields make a row unique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Data is like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name, Dept, ID, Sales&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A, aa, 1001, 5000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; B, bb, 1002, 2000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C, cc, 1003, 3000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; D, dd, 1004, 4000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; E, aa, 1005, 1000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; F, bb, 1006, 5000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; G, cc, 1007, 6000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; H, dd, 1009, 10000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I, aa, 1009, 14000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; J, bb, 1010, 12000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; K, cc, 1010, 9000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; L, dd, 1012, 8000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; M, aa, 1013, 7000&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope u will be able to understand my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 13:26:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329611#M576591</guid>
      <dc:creator>sunil2288</dc:creator>
      <dc:date>2012-03-30T13:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329612#M576592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Sunil&lt;/P&gt;&lt;P&gt;try this expression &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Aggr(if(rank(sum(Sales))&amp;lt;=V1,sum(Sales)),ID&amp;amp;Name&amp;amp;Dept))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Perumal&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 13:48:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329612#M576592</guid>
      <dc:creator>perumal_41</dc:creator>
      <dc:date>2012-03-30T13:48:22Z</dc:date>
    </item>
    <item>
      <title>Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329613#M576593</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;Use this expression if there are no Unique ID fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Aggr(if(rank(sum(Sales))&amp;lt;=V1,sum(Sales)),ID, Name))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 14:04:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329613#M576593</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-03-30T14:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329614#M576594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Perumal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While i use this expression &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Aggr(if(rank(sum(Sales))&amp;lt;=V1,sum(Sales)),ID&amp;amp;Name&amp;amp;Dept))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;It shows wrong value.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG __jive_id="12621" alt="VF3.JPG" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/12621_VF3.JPG" width="450" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here though H,bb,1010 having sum(Sales) as 12000 but in the chart it is showing L,dd,1012 having sum(sales) 12000&amp;nbsp; , which is wrong information.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Qlikview file Attached .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Still i am not able to get the correct value.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Regards&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 04:36:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329614#M576594</guid>
      <dc:creator>sunil2288</dc:creator>
      <dc:date>2012-04-02T04:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329615#M576595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try with this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;ID={"&lt;STRONG&gt;=Rank(Sum(Sales))&amp;lt;$(V1)&lt;/STRONG&gt;"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 04:49:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329615#M576595</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-04-02T04:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329616#M576596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Change you table structure like this with unique field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load Name&amp;amp;Dept&amp;amp;ID as Key,*;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name, Dept, ID, Sales&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A, aa, 1001, 5000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; B, bb, 1002, 2000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C, cc, 1003, 3000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; D, dd, 1004, 4000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; E, aa, 1005, 1000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; F, bb, 1006, 5000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; G, cc, 1007, 6000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; H, dd, 1009, 10000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I, aa, 1009, 14000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; J, bb, 1010, 12000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; K, cc, 1010, 9000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; L, dd, 1012, 8000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; M, aa, 1013, 7000&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use following one as expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Key={"&lt;STRONG style="font-size: 12px;"&gt;=Rank(Sum(Sales))&amp;lt;=$(V1)&lt;/STRONG&gt;"}&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 05:11:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329616#M576596</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-04-02T05:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329617#M576597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Celam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your valuable effort,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with the expression you have suggested :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;ID={"&lt;STRONG&gt;=Rank(Sum(Sales))&amp;lt;4&lt;/STRONG&gt;"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but with this expression the total value showing wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screenshot attached .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="VF4.JPG" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/12629_VF4.JPG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;anyways thanks for your effort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 05:31:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329617#M576597</guid>
      <dc:creator>sunil2288</dc:creator>
      <dc:date>2012-04-02T05:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329618#M576598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Celam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your valuable effort,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with the expression you have suggested :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;ID={"&lt;STRONG&gt;=Rank(Sum(Sales))&amp;lt;4&lt;/STRONG&gt;"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but with this expression the total value showing wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screenshot attached .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="12629" alt="VF4.JPG" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/12629_VF4.JPG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;anyways thanks for your effort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 05:32:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329618#M576598</guid>
      <dc:creator>sunil2288</dc:creator>
      <dc:date>2012-04-02T05:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329619#M576599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Did you checked with the another solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 05:47:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329619#M576599</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-04-02T05:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329620#M576600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Celam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are absolutely right if i will add a Key, all the problem will get resolved, but in the real case scenario what i am facing there is no scope of changing the Data Model, as becoz this expression has to be implemented on 8 dimensions which also includes Calculated dimensions. and the data model can't be changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it has to be get resolved in the frontend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your quick reply..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 05:57:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329620#M576600</guid>
      <dc:creator>sunil2288</dc:creator>
      <dc:date>2012-04-02T05:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329621#M576601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Changing data model is possible.Having a unique field in a table will be a good practice.Can you post the script how you created the table?.let me try to change it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 06:03:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329621#M576601</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-04-02T06:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329622#M576602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Celam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I agree it is good practice to have Unique field in a table. In this case the dimensions are from different table and expressions are from different table (Not a single expression too many expression has to be implemented like this). Sorry to say but again i am repeating there is no scope of changing the data model and reload again. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway i need to do in the frontend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;BR /&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 06:25:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329622#M576602</guid>
      <dc:creator>sunil2288</dc:creator>
      <dc:date>2012-04-02T06:25:02Z</dc:date>
    </item>
    <item>
      <title>Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329623#M576603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunil ,&lt;/P&gt;&lt;P&gt;Try this expression &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Total &amp;lt;ID,Name,Dept&amp;gt; Aggr(Distinct if(rank(sum(Sales))&amp;lt;=V1,sum(Sales)),ID))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Perumal A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 06:26:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329623#M576603</guid>
      <dc:creator>perumal_41</dc:creator>
      <dc:date>2012-04-02T06:26:35Z</dc:date>
    </item>
    <item>
      <title>Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329624#M576604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Then try this expression&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Sum(aggr(if(Rank(Total Sum(Sales))&amp;lt;=V1,Sum(Sales)),Name,ID,Dept))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 06:41:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329624#M576604</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-04-02T06:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329625#M576605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Celam and Perumal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response. The expression given by Celam is working correctly. How much i can able to do it in my complicated case has to be watched.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(aggr(if(Rank(Total Sum(Sales))&amp;lt;=V1,Sum(Sales)),Name,ID,Dept))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="VF5.JPG" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/12644_VF5.JPG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sunil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2012 14:17:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-aggr-function/m-p/329625#M576605</guid>
      <dc:creator>sunil2288</dc:creator>
      <dc:date>2012-04-02T14:17:37Z</dc:date>
    </item>
  </channel>
</rss>

