<?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: Tricky Aggregation in top 10 Values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797255#M281634</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can any body please help on this...&lt;/P&gt;&lt;P&gt;I have few Regions(4) and Cust_code, i need to calculate /create a barchart like&lt;/P&gt;&lt;P&gt;For every year top 10 values of the region&lt;BR /&gt;please check the image once&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have tried using Expression using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;&lt;STRONG&gt;sum&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;CUST_CD&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={&lt;/SPAN&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;$(=Concat(if(aggr(rank(sum (SALES ),CUST_CD)&amp;lt;=10,chr(39) &amp;amp; CUST_CD &amp;amp; chr(39)),','))&lt;/EM&gt;&lt;SPAN style="font-size: 10pt;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;SALES&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: here common codes are there between Regions ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sasi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Dec 2014 11:27:29 GMT</pubDate>
    <dc:creator>sasikanth</dc:creator>
    <dc:date>2014-12-30T11:27:29Z</dc:date>
    <item>
      <title>Tricky Aggregation in top 10 Values</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797248#M281627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Guys here i have a special requirement ,&lt;/P&gt;&lt;P&gt;I have the following fields&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ID , country, region, Cust_cd and year,&lt;/STRONG&gt; &lt;STRONG&gt;Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Here i want to calculate top 10 customers vs Other customers based on year and country&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my formula is&lt;/P&gt;&lt;P&gt;=&lt;STRONG&gt;sum({&amp;lt;Cust_cd={$(=concat(if(aggr(rank(sum(sales),4),cust_cd)&amp;lt;=10,chr(39)&amp;amp;Cust_cd&amp;amp;chr(39)),','))}&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and in a bar chart i am taking year and Country as Diemensions ,&lt;/P&gt;&lt;P&gt;when i made any selections on seperate list boxes country and year , then only it is giving correct values,&lt;/P&gt;&lt;P&gt;if i did not select any value then it is showing some other values ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem i have identified is when taking top 10 cust_cd , for the first time it is taking based on total COUNTRY field,&lt;/P&gt;&lt;P&gt;if you select a specific country then only it is showing top 10 values in that country,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as i am taking country as dimension , the chart has to show top 10 valeus accordingly ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you guys please help in sloving this problem , please let me know where i am doing mistake ...&lt;/P&gt;&lt;P&gt;&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;Sasi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 07:54:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797248#M281627</guid>
      <dc:creator>sasikanth</dc:creator>
      <dc:date>2014-11-10T07:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Aggregation in top 10 Values</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797249#M281628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you share your app or sample of your data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sergey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 07:58:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797249#M281628</guid>
      <dc:creator>SergeyMak</dc:creator>
      <dc:date>2014-11-10T07:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Aggregation in top 10 Values</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797250#M281629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;soryy i cannot ,&lt;/P&gt;&lt;P&gt;simple i am taking County as Dim and the above exp as EXPRESSION,&lt;/P&gt;&lt;P&gt;by default it is taking top 10 CUST based on all the countries , if i select on specific county then top 10 based on that country it is taking ,,,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 08:03:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797250#M281629</guid>
      <dc:creator>sasikanth</dc:creator>
      <dc:date>2014-11-10T08:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Aggregation in top 10 Values</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797251#M281630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's hard to say.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Just create a spreadsheet with some dummy data just to save the time and get result faster....&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 08:11:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797251#M281630</guid>
      <dc:creator>SergeyMak</dc:creator>
      <dc:date>2014-11-10T08:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Aggregation in top 10 Values</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797252#M281631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For top 10 use this:&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;PRE class="jive-pre"&gt;rangesum(Top(sum(Amount),1,10))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; For all products use this:&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;PRE class="jive-pre"&gt;sum(total Amount)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(aggr(Rank(Sum(sales),10),region)&amp;lt;=10,aggr(Sum(sales),region,country))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this helped you, please mark as Helpful. If it solves your issue, please mark as Answer&lt;BR /&gt; &lt;BR /&gt;Regards&lt;BR /&gt;Dhruv&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 08:26:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797252#M281631</guid>
      <dc:creator>djsampat</dc:creator>
      <dc:date>2014-11-10T08:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Aggregation in top 10 Values</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797253#M281632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not working&lt;/P&gt;&lt;P&gt;Here top 10 custmers i want , if based on region how can i get top 10 and others ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 09:09:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797253#M281632</guid>
      <dc:creator>sasikanth</dc:creator>
      <dc:date>2014-11-10T09:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Aggregation in top 10 Values</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797254#M281633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;There is no Country field in your data.&lt;/P&gt;&lt;P&gt;What should I use instead of?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sergey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 06:28:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797254#M281633</guid>
      <dc:creator>SergeyMak</dc:creator>
      <dc:date>2014-11-11T06:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Aggregation in top 10 Values</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797255#M281634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can any body please help on this...&lt;/P&gt;&lt;P&gt;I have few Regions(4) and Cust_code, i need to calculate /create a barchart like&lt;/P&gt;&lt;P&gt;For every year top 10 values of the region&lt;BR /&gt;please check the image once&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have tried using Expression using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;&lt;STRONG&gt;sum&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;CUST_CD&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={&lt;/SPAN&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;$(=Concat(if(aggr(rank(sum (SALES ),CUST_CD)&amp;lt;=10,chr(39) &amp;amp; CUST_CD &amp;amp; chr(39)),','))&lt;/EM&gt;&lt;SPAN style="font-size: 10pt;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;SALES&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: here common codes are there between Regions ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sasi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 11:27:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797255#M281634</guid>
      <dc:creator>sasikanth</dc:creator>
      <dc:date>2014-12-30T11:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Aggregation in top 10 Values</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797256#M281635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;any body?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 11:31:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797256#M281635</guid>
      <dc:creator>sasikanth</dc:creator>
      <dc:date>2014-12-30T11:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Aggregation in top 10 Values</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797257#M281636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please upload a sample Qvw so we can work with your data as an example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 07:49:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797257#M281636</guid>
      <dc:creator>djsampat</dc:creator>
      <dc:date>2015-01-05T07:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Aggregation in top 10 Values</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797258#M281637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;View attached sample. Replace the inline data with more lines if necessary or replace the Company and Region with familiar names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-7703"&gt;Top 3 Sales by Region Sample - Inline&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 08:04:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797258#M281637</guid>
      <dc:creator>djsampat</dc:creator>
      <dc:date>2015-01-05T08:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky Aggregation in top 10 Values</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797259#M281638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you try limiting the Dimension by Largest 10 and the expression is the Region Sales only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/74604_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;If this helped you, please mark as Helpful. If it solves your issue, please mark as Answer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Dhruv&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 08:07:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-Aggregation-in-top-10-Values/m-p/797259#M281638</guid>
      <dc:creator>djsampat</dc:creator>
      <dc:date>2015-01-05T08:07:57Z</dc:date>
    </item>
  </channel>
</rss>

