<?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 how to display top 5 customers in pivot table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/how-to-display-top-5-customers-in-pivot-table/m-p/194907#M55637</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;If you have more than one dimension in your pivot then you must recognise this in the Aggr function that you use. You should remember that the Aggr function moves outside of any dimensions that exist in the chart, which means that it will ignore those dimensions and aggregate according to what you tell it to aggregate.&lt;/P&gt;&lt;P&gt;The expression I gave you was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;= IF ( Aggr ( Rank ( Sum ( Item_NetAmt ) , Customer ) &amp;lt;= 5 , Sum ( Item_NetAmt ) )&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;However, if you have Country, State, City (in that order) in your pivot table as dimensions, then you should create an expression as follows:&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 ( Sum ( item_netamt ) , Country, State, City ) &amp;lt;= 5 , Sum ( item_netamt ) )&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If you are still getting the error message after doing this, could you pop an example of your application onto the thread and I'll take a look.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Dec 2009 15:30:01 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-12-23T15:30:01Z</dc:date>
    <item>
      <title>how to display top 5 customers in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-display-top-5-customers-in-pivot-table/m-p/194902#M55632</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;i m facing problem in displaying top five customers in pivot table ,which i want to determine from 'item_netamt; field. in mkg_sale_details table there is multiple 'item_netamt; entries against customers .i want to get top 5 customers on the basis of top 5 sum('item_netamt;) per customer.&lt;/P&gt;&lt;P&gt;is there any function which can be used in chart expression to get the desired.&lt;/P&gt;&lt;P&gt;thanks!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 13:13:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-display-top-5-customers-in-pivot-table/m-p/194902#M55632</guid>
      <dc:creator />
      <dc:date>2009-12-22T13:13:54Z</dc:date>
    </item>
    <item>
      <title>how to display top 5 customers in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-display-top-5-customers-in-pivot-table/m-p/194903#M55633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can use the sraight table and sort the expression values in descending order.&lt;/P&gt;&lt;P&gt;Then,on the presentation tab you can mention "Max Number(1-100)=5.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 15:12:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-display-top-5-customers-in-pivot-table/m-p/194903#M55633</guid>
      <dc:creator>ipauldur</dc:creator>
      <dc:date>2009-12-22T15:12:47Z</dc:date>
    </item>
    <item>
      <title>how to display top 5 customers in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-display-top-5-customers-in-pivot-table/m-p/194904#M55634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use aggr function with Rank in combination:&lt;/P&gt;&lt;P&gt;below is to show Top 10 Category for jul 2009 basis count of call no&lt;/P&gt;&lt;P&gt;if(aggr(rank(Count(If(Open_Period='Jul 2009',Callno))),Catagory)&amp;lt;=10,Catagory)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 15:16:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-display-top-5-customers-in-pivot-table/m-p/194904#M55634</guid>
      <dc:creator />
      <dc:date>2009-12-22T15:16:12Z</dc:date>
    </item>
    <item>
      <title>how to display top 5 customers in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-display-top-5-customers-in-pivot-table/m-p/194905#M55635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;To do this, you would use the Aggr and Rank functions on the expression you have in your pivot table.&lt;/P&gt;&lt;P&gt;Let's assume you have only one dimension called Customer in the pivot, and that you have only one expression which is Sum(Item_NetAmt), in this case you would amend your expression as follows:&lt;/P&gt;&lt;P&gt;= IF ( Aggr ( Rank ( Sum ( Item_NetAmt ) , Customer ) &amp;lt;= 5 , Sum ( Item_NetAmt ) )&lt;/P&gt;&lt;P&gt;So, what you are doing here is aggregating the sum of item_netamt over the customer dimension and then checking that the rank of that aggregation is up to 5, if it is then show the sum, ohterwise show nothing.&lt;/P&gt;&lt;P&gt;Note: If you have more than one dimension in your pivot then you should make sure that the aggregation (Aggr) function recognises that by including those dimensions in the aggr function.&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 15:19:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-display-top-5-customers-in-pivot-table/m-p/194905#M55635</guid>
      <dc:creator />
      <dc:date>2009-12-22T15:19:21Z</dc:date>
    </item>
    <item>
      <title>how to display top 5 customers in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-display-top-5-customers-in-pivot-table/m-p/194906#M55636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanx for reply!!&lt;/P&gt;&lt;P&gt;but i still have some problem in it, it displays 'error in calculated expression' in pivot table.&lt;/P&gt;&lt;P&gt;for your help, i have four fields in pivot table, which are country,state,city, sum(item_netamt) apart from top 5 customers. all fields are coming from different tables which are associated in qlikview.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 15:12:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-display-top-5-customers-in-pivot-table/m-p/194906#M55636</guid>
      <dc:creator />
      <dc:date>2009-12-23T15:12:06Z</dc:date>
    </item>
    <item>
      <title>how to display top 5 customers in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-display-top-5-customers-in-pivot-table/m-p/194907#M55637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;If you have more than one dimension in your pivot then you must recognise this in the Aggr function that you use. You should remember that the Aggr function moves outside of any dimensions that exist in the chart, which means that it will ignore those dimensions and aggregate according to what you tell it to aggregate.&lt;/P&gt;&lt;P&gt;The expression I gave you was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;= IF ( Aggr ( Rank ( Sum ( Item_NetAmt ) , Customer ) &amp;lt;= 5 , Sum ( Item_NetAmt ) )&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;However, if you have Country, State, City (in that order) in your pivot table as dimensions, then you should create an expression as follows:&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 ( Sum ( item_netamt ) , Country, State, City ) &amp;lt;= 5 , Sum ( item_netamt ) )&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If you are still getting the error message after doing this, could you pop an example of your application onto the thread and I'll take a look.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 15:30:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-display-top-5-customers-in-pivot-table/m-p/194907#M55637</guid>
      <dc:creator />
      <dc:date>2009-12-23T15:30:01Z</dc:date>
    </item>
    <item>
      <title>how to display top 5 customers in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-display-top-5-customers-in-pivot-table/m-p/194908#M55638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Newlearner,&lt;/P&gt;&lt;P&gt;The original formula&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;= IF ( Aggr ( Rank ( Sum ( Item_NetAmt ) , Customer ) &amp;lt;= 5 ), Sum ( Item_NetAmt ) ) has one right parenthesis misplaced.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;&lt;BR /&gt;&lt;/B&gt; &lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&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;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The correct fomula should read :&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;= IF ( Aggr ( Rank ( Sum ( Item_NetAmt )) , Customer ) &amp;lt;= 5 , Sum ( Item_NetAmt ) )&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 20:05:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-display-top-5-customers-in-pivot-table/m-p/194908#M55638</guid>
      <dc:creator />
      <dc:date>2009-12-23T20:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to display top 5 customers in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-display-top-5-customers-in-pivot-table/m-p/194909#M55639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Good morning! friend&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I am facing&amp;nbsp; the same problem and I need your help&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I try to display the first 10 sales per country in a Pivot table&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: line-through;"&gt;&lt;A href="https://community.qlik.com/legacyfs/online/59834_sales.PNG.png"&gt;&lt;IMG alt="sales.PNG.png" class="jive-image jiveImage" height="400" src="https://community.qlik.com/legacyfs/online/59834_sales.PNG.png" style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;" width="296" /&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;so I added this expression in dimensions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: line-through;"&gt;&lt;A href="https://community.qlik.com/legacyfs/online/59835_Capture.PNG.png"&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image jiveImage" height="641" src="https://community.qlik.com/legacyfs/online/59835_Capture.PNG.png" style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;" width="936" /&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;and as a result I have&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: line-through;"&gt;&lt;A href="https://community.qlik.com/legacyfs/online/59836_Capture.PNG.png"&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image jiveImage" height="237" src="https://community.qlik.com/legacyfs/online/59836_Capture.PNG.png" style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;" width="329" /&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;as you can see&amp;nbsp; for 2010 it gives a result&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;USA-&amp;gt; France-&amp;gt; germany&lt;/SPAN&gt;&amp;nbsp; and the logical order is &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;USA-&amp;gt; France-&amp;gt; UK&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; why?&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thank you for your answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 07:04:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-display-top-5-customers-in-pivot-table/m-p/194909#M55639</guid>
      <dc:creator />
      <dc:date>2014-05-30T07:04:03Z</dc:date>
    </item>
  </channel>
</rss>

