<?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: TOP 5 in the Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664195#M1068833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DataNibbler&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for reply, but i need the Amt only once not Twice as you can see the output in my earlier attached sheet,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Aug 2014 15:07:10 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-08-27T15:07:10Z</dc:date>
    <item>
      <title>TOP 5 in the Table</title>
      <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664192#M1068830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hi Friends,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need your help here.&amp;nbsp; I have 3 columns (Party Name, Ratings, Amt). I have to find the Top 5 Party Name on the basis of Amt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The challenge here for me is that there are multiple Ratings for the Party Name(so there are multiple lines and the corresponding Amt) , but i need to show only the highest rating for the party in the table, &lt;STRONG&gt;but the sum of Amount would be the Sum of the Amt not only that particular Rating.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached the Data in the excel and even &lt;STRONG&gt;attached the OUTPUT in the same Sheet&lt;/STRONG&gt;.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if this is not understandable.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Require your help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Ankit Modi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 14:46:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664192#M1068830</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-27T14:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: TOP 5 in the Table</title>
      <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664193#M1068831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so I understand you need the Amt twice - once the individual amound (by which the records are to be filtered and by which you want to single out the top5) and once the total rgd. one particular Party_Name - correct?&lt;/P&gt;&lt;P&gt;Well, I would recommend doing this in two steps although you could possily do it in one - it just makes it a bit easier to understand for others who might end up having to work with your code:&lt;/P&gt;&lt;P&gt;1) Generate a field for the total_amt in the table (aggregate the table in a RESIDENT LOAD using the sum() function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - don't forget the GROUP BY clause - actually, for this aggregated RESIDENT LOAD you need only two fields,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; the Party_Name and the individual_amount (which you sum up)&lt;/P&gt;&lt;P&gt;2) Load RESIDENT from the primary table, again aggregating and using the max() function - you will need five lines&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; with the max() function, each with a different parameter - max(amt, 1), max(amt, 2) etc.&lt;/P&gt;&lt;P&gt;3) To this table (which should have only 5 lines), you join the total_amt, using the Party_Name as the Join_field&lt;/P&gt;&lt;P&gt;It might be done otherwise and you could possibly do it all in fewer steps, but this would be my approach.&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 15:00:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664193#M1068831</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-08-27T15:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: TOP 5 in the Table</title>
      <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664194#M1068832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a Straight Table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension = Calculated Dimension&lt;/P&gt;&lt;P&gt;=IF(Aggr(Rank(SUM(Amt),4),Party)&amp;lt;=5, Party)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tick Suppress When Value is Null&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression1 &lt;/P&gt;&lt;P&gt;SUM(Amt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression2&lt;/P&gt;&lt;P&gt;FirstSortedValue(Ratings, -Amt)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 15:05:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664194#M1068832</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-08-27T15:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: TOP 5 in the Table</title>
      <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664195#M1068833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DataNibbler&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for reply, but i need the Amt only once not Twice as you can see the output in my earlier attached sheet,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 15:07:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664195#M1068833</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-27T15:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: TOP 5 in the Table</title>
      <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664196#M1068834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankit,&lt;/P&gt;&lt;P&gt;&amp;nbsp; PFA,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 15:07:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664196#M1068834</guid>
      <dc:creator />
      <dc:date>2014-08-27T15:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: TOP 5 in the Table</title>
      <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664197#M1068835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Manish.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can you explain what 4 means in the below expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(Aggr(Rank(SUM(Amt),4),Party)&amp;lt;=5, Party)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 15:21:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664197#M1068835</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-27T15:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: TOP 5 in the Table</title>
      <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664198#M1068836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Mukesh, Thanks for the reply just wanted to know if i dnt use Mid function will it work? As i dont need to exculde O&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 15:22:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664198#M1068836</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-27T15:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: TOP 5 in the Table</title>
      <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664199#M1068837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankit,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; you can, but you need to do some changes in backend script. simply in above qvw --&amp;gt; on resident table change&lt;/P&gt;&lt;P&gt; 'O'&amp;amp;max(Ratings) as Ratings,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 15:33:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664199#M1068837</guid>
      <dc:creator />
      <dc:date>2014-08-27T15:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: TOP 5 in the Table</title>
      <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664200#M1068838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;IF(Aggr(Rank(SUM(Amt),4),Party)&amp;lt;=5, Party)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will load only those party, whose SUM(Amt) is Ranked as TOP 5..&lt;/P&gt;&lt;P&gt;It will be simplified as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM(Amt) = SUM of Amount&lt;/P&gt;&lt;P&gt;Rank(SUM(Amt),4) = Rank of SUM of Amount with same SUM(Amount) will be given different Rank...&lt;/P&gt;&lt;P&gt;Aggr(Rank(SUM(Amt),4),Party) = Same as above but Aggregated by Party... This is same as Group By of SQL&lt;/P&gt;&lt;P&gt;Now Checking with IF condition, and displaying only TOP 5... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 15:42:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664200#M1068838</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-08-27T15:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: TOP 5 in the Table</title>
      <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664201#M1068839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mukesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output is not matching with your solution.. You can chk in my Output file for Party name ZINC INL the rating is O7 whereas you are getting O9.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 15:45:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664201#M1068839</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-27T15:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: TOP 5 in the Table</title>
      <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664202#M1068840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankit,&lt;/P&gt;&lt;P&gt;Have your tried my solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 15:48:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664202#M1068840</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-08-27T15:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: TOP 5 in the Table</title>
      <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664203#M1068841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Manish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ya when i am using in my Actual application its not working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 15:57:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664203#M1068841</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-27T15:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Re: TOP 5 in the Table</title>
      <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664204#M1068842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check enclosed file...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 15:59:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664204#M1068842</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-08-27T15:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Re: TOP 5 in the Table</title>
      <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664205#M1068843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankit,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; PFA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 17:53:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664205#M1068843</guid>
      <dc:creator />
      <dc:date>2014-08-27T17:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: TOP 5 in the Table</title>
      <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664206#M1068844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Manish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 18:23:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664206#M1068844</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-27T18:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: TOP 5 in the Table</title>
      <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664207#M1068845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Mukesh.. One last Question how you restricted Top 5 in your application?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 18:24:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664207#M1068845</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-27T18:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: TOP 5 in the Table</title>
      <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664208#M1068846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you get your solution... kindly close the thread by selecting the correct/helpful answer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 08:11:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664208#M1068846</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-08-28T08:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: TOP 5 in the Table</title>
      <link>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664209#M1068847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Table Properties --&amp;gt; Presentation --&amp;gt; Max Number --&amp;gt; only top 5(Sorting on Amount in Sort tab also)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 10:14:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOP-5-in-the-Table/m-p/664209#M1068847</guid>
      <dc:creator />
      <dc:date>2014-08-28T10:14:07Z</dc:date>
    </item>
  </channel>
</rss>

