<?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 Issue in displaying top2 values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300144#M1185093</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use:&lt;/P&gt;&lt;P&gt;a:&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;sum(Amount) as Amt,&lt;/P&gt;&lt;P&gt;ID resident tablename group by ID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you get the sum of amounts based on ID's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then apply:&lt;/P&gt;&lt;P&gt;load * resident a order by Amt desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you get the data in descending order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Nov 2011 10:50:32 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-11-07T10:50:32Z</dc:date>
    <item>
      <title>Issue in displaying top2 values</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300139#M1185088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;I had a issue in displaying Top 2 values. I had a table with ID, Country, Amount. I would like to take Top 2 ID's based on Amount.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;Load * inline&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;[ID, Country, Amount&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;1,'India', 20&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;2,'UK',40&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;1,'UK',10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;1,'Europe',30&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;3,'USA',50&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;3,'India',60&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;4,'UK',10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;5,'India',0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;In a straight table, I have ID, Country as dimensions and sum(Amount) as expression. I have sorted ID field based on Expression sum(Amount).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;Output:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;ID, Country, Amount&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;3,'India',60&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;3,'USA',50&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;1,'Europe',30&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;1,'India', 20&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;1,'UK',10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;Please advise.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;Thanks &amp;amp; Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;Devaki&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 09:14:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300139#M1185088</guid>
      <dc:creator />
      <dc:date>2011-11-07T09:14:45Z</dc:date>
    </item>
    <item>
      <title>Issue in displaying top2 values</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300140#M1185089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you have to do this in script:&lt;/P&gt;&lt;P&gt;load * from tablename order by Amount desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by this you get all the records sorted according to amount in descending order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after that take a variable:&lt;/P&gt;&lt;P&gt;set x = peek('Amount',1,tablename);&lt;/P&gt;&lt;P&gt;you get the second highest value of amount in x.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now again load the table:&lt;/P&gt;&lt;P&gt;a:&lt;/P&gt;&lt;P&gt;load * resident tablename where Amount&amp;lt;= $(x);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by doing this you load only top two records in table a.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this it will help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 09:47:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300140#M1185089</guid>
      <dc:creator />
      <dc:date>2011-11-07T09:47:46Z</dc:date>
    </item>
    <item>
      <title>Issue in displaying top2 values</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300141#M1185090</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;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are taking the top 2 values based on the sum(amount) which means for ID 3 the sum is 110 which is the first top and then ID 1 which is 60. We are taking the top2 based on individual amounts. Also we cannot do any script level changes. As we are taking some of the inputs from the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 09:56:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300141#M1185090</guid>
      <dc:creator />
      <dc:date>2011-11-07T09:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in displaying top2 values</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300142#M1185091</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;Could you please describe how the output should look like?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you looking for the second highest IDs (aggregated sum(Amount) for the countrys) or are you looking for the aggregated values of each ID with the second highest countrys?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 10:11:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300142#M1185091</guid>
      <dc:creator />
      <dc:date>2011-11-07T10:11:17Z</dc:date>
    </item>
    <item>
      <title>Issue in displaying top2 values</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300143#M1185092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am looking for Top 2 ID's (for example, Top2 companies) based on Amount (aggregated by ID). Output should be &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;ID, Country, Amount&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;3,'India',60&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;3,'USA',50&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;1,'Europe',30&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;1,'India', 20&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial;"&gt;1,'UK',10&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 10:32:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300143#M1185092</guid>
      <dc:creator />
      <dc:date>2011-11-07T10:32:30Z</dc:date>
    </item>
    <item>
      <title>Issue in displaying top2 values</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300144#M1185093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use:&lt;/P&gt;&lt;P&gt;a:&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;sum(Amount) as Amt,&lt;/P&gt;&lt;P&gt;ID resident tablename group by ID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you get the sum of amounts based on ID's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then apply:&lt;/P&gt;&lt;P&gt;load * resident a order by Amt desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you get the data in descending order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 10:50:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300144#M1185093</guid>
      <dc:creator />
      <dc:date>2011-11-07T10:50:32Z</dc:date>
    </item>
    <item>
      <title>Issue in displaying top2 values</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300145#M1185094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cannot do any calculations at script level as i am taking inputs from the users using Input boxes. So i need to do on the presentation level itself.&lt;/P&gt;&lt;P&gt;We can use RANK(SUM(Amount)). But it is displaying Ranks as below. Rank resets for every ID. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID, Country, Amount, Rank(sum(Amount))&lt;/P&gt;&lt;P&gt;3,'India',60,1&lt;/P&gt;&lt;P&gt;3,'USA',50,2&lt;/P&gt;&lt;P&gt;1,'Europe',30,1&lt;/P&gt;&lt;P&gt;1,'India', 20,2&lt;/P&gt;&lt;P&gt;1,'UK',10,3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we get the same Rank for each ID as below then we can solve it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID, Country, Amount, Rank(sum(Amount))&lt;/P&gt;&lt;P&gt;3,'India',60,1&lt;/P&gt;&lt;P&gt;3,'USA',50,1&lt;/P&gt;&lt;P&gt;1,'Europe',30,2&lt;/P&gt;&lt;P&gt;1,'India', 20,2&lt;/P&gt;&lt;P&gt;1,'UK',10,2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please look from this view.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 11:05:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300145#M1185094</guid>
      <dc:creator />
      <dc:date>2011-11-07T11:05:52Z</dc:date>
    </item>
    <item>
      <title>Issue in displaying top2 values</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300146#M1185095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you want to do this at presentation level than simply:&lt;/P&gt;&lt;P&gt;1.take a pivot table ,&lt;/P&gt;&lt;P&gt;2.add dimensions:&lt;/P&gt;&lt;P&gt;ID and country&lt;/P&gt;&lt;P&gt;3.expression:&lt;/P&gt;&lt;P&gt;sum(Amount)&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;4.tick the checkbox of " &lt;STRONG&gt;show partial sum&lt;/STRONG&gt; " in the presentation tab after selecting &lt;STRONG&gt;ID&lt;/STRONG&gt; in "&lt;STRONG&gt;dimensions and expressions"&lt;/STRONG&gt; and sort it in &lt;STRONG&gt;descending order&lt;/STRONG&gt; according to &lt;STRONG&gt;sum(Amount)&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vijit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 11:23:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300146#M1185095</guid>
      <dc:creator />
      <dc:date>2011-11-07T11:23:30Z</dc:date>
    </item>
    <item>
      <title>Issue in displaying top2 values</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300147#M1185096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try your rank expression like this:&lt;/P&gt;&lt;P&gt;=aggr(NODISTINCT if(rank(sum(total&amp;lt;ID&amp;gt; Amount))&amp;lt;=2,rank(sum(total&amp;lt;ID&amp;gt; Amount)),0),ID)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 11:38:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300147#M1185096</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-11-07T11:38:36Z</dc:date>
    </item>
    <item>
      <title>Issue in displaying top2 values</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300148#M1185097</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'm not sure what You are trying to achieve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/" /&gt;&lt;IMG alt="Ranking.JPG" class="jive-image" src="https://community.qlik.com/legacyfs/online/8464_Ranking.JPG" /&gt;&lt;/P&gt;&lt;P&gt;If that is what you want, then:&lt;/P&gt;&lt;P&gt;Expression 1: &lt;IMG src="https://community.qlik.com/" /&gt;&lt;IMG src="https://community.qlik.com/" /&gt;Sum(Aggr(Sum(Amount),ID))&lt;/P&gt;&lt;P&gt;Expression 2: Rank(Expr1)&lt;/P&gt;&lt;P&gt;Expr3: If(Exp2 = 1 OR Exp2 = 2,Exp2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Miikka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 11:58:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300148#M1185097</guid>
      <dc:creator>miikkaqlick</dc:creator>
      <dc:date>2011-11-07T11:58:33Z</dc:date>
    </item>
    <item>
      <title>Issue in displaying top2 values</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300149#M1185098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://community.qlik.com/people/swuehl" id="jive-158239101854263359507" onmouseout="" onmouseover=""&gt;swuehl&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got the rank as expected with your query. &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="266"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl22" height="17" width="40"&gt;ID&lt;/TD&gt;&lt;TD class="xl22" style="border-left: medium none;" width="73"&gt;Country&lt;/TD&gt;&lt;TD class="xl22" style="border-left: medium none;" width="99"&gt;SUM(Amount)&lt;/TD&gt;&lt;TD class="xl22" style="border-left: medium none;" width="54"&gt;Rank&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl23" height="17" style="border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD class="xl23" style="border-top: medium none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl24" style="border-top: medium none;"&gt;220&lt;/TD&gt;&lt;TD class="xl24" style="border-top: medium none; border-left: medium none;"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl25" height="17" style="border-top: medium none;"&gt;3&lt;/TD&gt;&lt;TD class="xl25" style="border-top: medium none; border-left: medium none;"&gt;India&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-top: medium none; border-left: medium none;"&gt;60&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl25" height="17" style="border-top: medium none;"&gt;3&lt;/TD&gt;&lt;TD class="xl25" style="border-top: medium none; border-left: medium none;"&gt;USA&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-top: medium none; border-left: medium none;"&gt;50&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl25" height="17" style="border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl25" style="border-top: medium none; border-left: medium none;"&gt;Europe&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-top: medium none; border-left: medium none;"&gt;30&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl25" height="17" style="border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl25" style="border-top: medium none; border-left: medium none;"&gt;India&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-top: medium none; border-left: medium none;"&gt;20&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl25" height="17" style="border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl25" style="border-top: medium none; border-left: medium none;"&gt;UK&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-top: medium none; border-left: medium none;"&gt;10&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl25" height="17" style="border-top: medium none;"&gt;2&lt;/TD&gt;&lt;TD class="xl25" style="border-top: medium none; border-left: medium none;"&gt;UK&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-top: medium none; border-left: medium none;"&gt;40&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-top: medium none; border-left: medium none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl25" height="17" style="border-top: medium none;"&gt;4&lt;/TD&gt;&lt;TD class="xl25" style="border-top: medium none; border-left: medium none;"&gt;UK&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-top: medium none; border-left: medium none;"&gt;10&lt;/TD&gt;&lt;TD align="right" class="xl25" style="border-top: medium none; border-left: medium none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;But could you let me know how to restrict the number of rows of table to rank&amp;lt;=2.This might be easy but i did not get the idea how to restrict it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Miikka,&lt;/P&gt;&lt;P&gt;I want to get Top2 IDs(for example, Companies) which are performing well based on sum(Amount).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 13:03:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300149#M1185098</guid>
      <dc:creator />
      <dc:date>2011-11-07T13:03:18Z</dc:date>
    </item>
    <item>
      <title>Issue in displaying top2 values</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300150#M1185099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe try&lt;/P&gt;&lt;P&gt;if(column(2)&amp;gt;0, sum(Amount))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of your sum(Amount) expression. And check suppress zero values in presentation tab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 13:10:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300150#M1185099</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-11-07T13:10:37Z</dc:date>
    </item>
    <item>
      <title>Issue in displaying top2 values</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300151#M1185100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suppress Zero values is not working. Also I cannot suppress Zero values as i have some IDs with Zero Amount.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 13:18:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300151#M1185100</guid>
      <dc:creator />
      <dc:date>2011-11-07T13:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in displaying top2 values</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300152#M1185101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might try this as caclulated dimension instead of ID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=aggr(NODISTINCT if(rank(sum(total&amp;lt;ID&amp;gt; Amount))&amp;lt;=2,ID),ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check suppress when value is NULL on dimension tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: As calculated dimension, it should be possible to simplify above to&lt;/P&gt;&lt;P&gt;=aggr(if(rank(sum(Amount))&amp;lt;=2,ID),ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 13:28:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300152#M1185101</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-11-07T13:28:41Z</dc:date>
    </item>
    <item>
      <title>Issue in displaying top2 values</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300153#M1185102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is working. You are a Genius.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 14:26:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300153#M1185102</guid>
      <dc:creator />
      <dc:date>2011-11-07T14:26:40Z</dc:date>
    </item>
    <item>
      <title>Issue in displaying top2 values</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300154#M1185103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,Swuehl&amp;nbsp;&amp;nbsp; Exlent,Thx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 14:36:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-displaying-top2-values/m-p/300154#M1185103</guid>
      <dc:creator />
      <dc:date>2011-11-07T14:36:38Z</dc:date>
    </item>
  </channel>
</rss>

