<?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 Top N in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Top-N/m-p/185241#M49804</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it's OK to sort your chart by the expression descending, then you can just set a max number of 10 on the presentation tab, and not have to fiddle with calculated dimensions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Nov 2010 19:19:59 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2010-11-12T19:19:59Z</dc:date>
    <item>
      <title>Top N</title>
      <link>https://community.qlik.com/t5/QlikView/Top-N/m-p/185237#M49800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNoSpacing"&gt;Hi,&lt;/P&gt;&lt;P class="MsoNoSpacing"&gt;&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;I'm trying to create a straight table chart that will display a Top N (10). My dimension is customer and the expression is sum({&amp;lt;SYS_ID*={'ADVANCE_1LINK'}&amp;gt;} TXN_COUNT). As it is now its displaying all customers where I'm trying to show just the Top 10 based in the expression. I'm not sure of the syntax although I think I may need to use the Top function. I'm not sure of the syntax - any help would be greatly appreciated.&lt;/P&gt;&lt;P class="MsoNoSpacing"&gt;&lt;/P&gt;&lt;P class="MsoNoSpacing"&gt;Also, do I need to use an input box or can I just hard code the expression to be top 10?&lt;/P&gt;&lt;P class="MsoNoSpacing"&gt;Thanks,&lt;/P&gt;&lt;P class="MsoNoSpacing"&gt;Shannon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 17:31:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Top-N/m-p/185237#M49800</guid>
      <dc:creator />
      <dc:date>2010-11-12T17:31:09Z</dc:date>
    </item>
    <item>
      <title>Top N</title>
      <link>https://community.qlik.com/t5/QlikView/Top-N/m-p/185238#M49801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Shannon,&lt;/P&gt;&lt;P&gt;You may use the following as dimension, and leave the expression as it is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=If(aggr(rank(aggr(sum({&amp;lt;SYS_ID*={'ADVANCE_1LINK'}&amp;gt;} TXN_COUNT), &lt;B&gt;ID&lt;/B&gt;), 4, 2), &lt;B&gt;CustomerID&lt;/B&gt;) &amp;lt;= 10, CustomerID)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;You may need to change the code above, as the aggr() function used above must use the rest of dimensions in your chart. In my case there are two: ID and CustomerID.&lt;/P&gt;&lt;P&gt;By the way, you can use a variable instead of hardcoding the "10" so the user can select with, say, a slider object, the number of top customers he wants to display:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=If(aggr(rank(aggr(sum({&amp;lt;SYS_ID*={'ADVANCE_1LINK'}&amp;gt;} TXN_COUNT), ID), 4, 2), CustomerID) &amp;lt;= &lt;B&gt;$(vTopNumber)&lt;/B&gt;, CustomerID)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Hope that helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 18:03:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Top-N/m-p/185238#M49801</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-11-12T18:03:43Z</dc:date>
    </item>
    <item>
      <title>Top N</title>
      <link>https://community.qlik.com/t5/QlikView/Top-N/m-p/185239#M49802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is what I used for a dimension and it works great - thanks!&lt;/P&gt;&lt;P&gt;=If(aggr(rank(aggr(sum({&amp;lt;SYS_ID*={'ADVANCE_1LINK'}&amp;gt;} TXN_COUNT), CUST_NO), 4, 2), CUST_NAME) &amp;lt;= 10, CUST_NAME)&lt;/P&gt;&lt;P&gt;One last question: Is there a way to restrict the remaining rows? My straight table chart is displaying the CUST_NAME where they are in the top 10 and displaying a dash '-' when they are not. I would like to display only 10 rows. Full disclosure - I've had no Qlikview training but am scheduled to go next month.&lt;/P&gt;&lt;P&gt;Thanks again for your help.&lt;/P&gt;&lt;P&gt;Shannon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 18:22:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Top-N/m-p/185239#M49802</guid>
      <dc:creator />
      <dc:date>2010-11-12T18:22:12Z</dc:date>
    </item>
    <item>
      <title>Top N</title>
      <link>https://community.qlik.com/t5/QlikView/Top-N/m-p/185240#M49803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shannon, I'm glad to help. To avoid the null value showing, you can do any of the following:&lt;/P&gt;&lt;P&gt;If you don't want to accumulate the values for those who don't macth that top N, just select the calculated dimension and tick the checkbox "Supress When Value Is Null".&lt;/P&gt;&lt;P&gt;But if you want to show then as "Others" or "Not Top 10", you can set the "else" part in the if conditional&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=If(aggr(rank(aggr(sum({&amp;lt;SYS_ID*={'ADVANCE_1LINK'}&amp;gt;} TXN_COUNT), CUST_NO), 4, 2), CUST_NAME) &amp;lt;= 10, CUST_NAME, 'Others')&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 18:26:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Top-N/m-p/185240#M49803</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-11-12T18:26:37Z</dc:date>
    </item>
    <item>
      <title>Top N</title>
      <link>https://community.qlik.com/t5/QlikView/Top-N/m-p/185241#M49804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it's OK to sort your chart by the expression descending, then you can just set a max number of 10 on the presentation tab, and not have to fiddle with calculated dimensions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 19:19:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Top-N/m-p/185241#M49804</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-11-12T19:19:59Z</dc:date>
    </item>
    <item>
      <title>Top N</title>
      <link>https://community.qlik.com/t5/QlikView/Top-N/m-p/185242#M49805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect! Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 19:57:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Top-N/m-p/185242#M49805</guid>
      <dc:creator />
      <dc:date>2010-11-12T19:57:20Z</dc:date>
    </item>
    <item>
      <title>Top N</title>
      <link>https://community.qlik.com/t5/QlikView/Top-N/m-p/185243#M49806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That also makes sense. Thanks for the tip.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 19:57:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Top-N/m-p/185243#M49806</guid>
      <dc:creator />
      <dc:date>2010-11-12T19:57:49Z</dc:date>
    </item>
  </channel>
</rss>

