<?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 Bucket Rank'ed Data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Bucket-Rank-ed-Data/m-p/1291817#M403789</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;First off if there is an answer already in the community then I am sorry I have missed it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking to Rank and Bucket Data... what I would like to do is rank a number of customers based on their value. I would then like to take the total value and split that into 10 equal buckets (i.e. 10% gaps) and count the number of customers (based on their ranking order) that it takes to fill that bucket. Also it would be good to know the actual value of that bucket (as it is not expected that things will split nicely)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I would end up with something like:&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="124" style="border: 1px solid #000000; width: 350px; height: 124px;" width="348"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Number of Clients&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Bucket&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;1,637&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;16&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;1,642&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;24&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;1,620&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I felt that I could do this with a combination of AGGR, Class and Rank (from looking around and reading) but I cannot seem to get anything to work as I would like (i.e. the above table) or get close.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did find the following against an example that looked positive:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;=AGGR(CLASS(RANK(SUM([Revenue])),10,SUM([Revenue])),Company)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yet that does not seem to want to allow me to change the classing into a bucket that I can group the data by....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... eventually this will be tables and charts... apparently &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would anybody have any ideas or something to push me in the right direction...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any ideas and\or help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Nov 2016 14:28:41 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-11-22T14:28:41Z</dc:date>
    <item>
      <title>Bucket Rank'ed Data</title>
      <link>https://community.qlik.com/t5/QlikView/Bucket-Rank-ed-Data/m-p/1291817#M403789</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;First off if there is an answer already in the community then I am sorry I have missed it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking to Rank and Bucket Data... what I would like to do is rank a number of customers based on their value. I would then like to take the total value and split that into 10 equal buckets (i.e. 10% gaps) and count the number of customers (based on their ranking order) that it takes to fill that bucket. Also it would be good to know the actual value of that bucket (as it is not expected that things will split nicely)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I would end up with something like:&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="124" style="border: 1px solid #000000; width: 350px; height: 124px;" width="348"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Number of Clients&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Bucket&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;1,637&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;16&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;1,642&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;24&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;1,620&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I felt that I could do this with a combination of AGGR, Class and Rank (from looking around and reading) but I cannot seem to get anything to work as I would like (i.e. the above table) or get close.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did find the following against an example that looked positive:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;=AGGR(CLASS(RANK(SUM([Revenue])),10,SUM([Revenue])),Company)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yet that does not seem to want to allow me to change the classing into a bucket that I can group the data by....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... eventually this will be tables and charts... apparently &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would anybody have any ideas or something to push me in the right direction...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any ideas and\or help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 14:28:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bucket-Rank-ed-Data/m-p/1291817#M403789</guid>
      <dc:creator />
      <dc:date>2016-11-22T14:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Bucket Rank'ed Data</title>
      <link>https://community.qlik.com/t5/QlikView/Bucket-Rank-ed-Data/m-p/1291818#M403790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to provide some sample data to get the above output?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 14:30:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bucket-Rank-ed-Data/m-p/1291818#M403790</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-11-22T14:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Bucket Rank'ed Data</title>
      <link>https://community.qlik.com/t5/QlikView/Bucket-Rank-ed-Data/m-p/1291819#M403791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried to complete a mock up of the table using some data... hopefully this will make a bit of sense and it does show that the bucket and the data will never fully line up due to the way that the data works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 15:19:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bucket-Rank-ed-Data/m-p/1291819#M403791</guid>
      <dc:creator />
      <dc:date>2016-11-22T15:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Bucket Rank'ed Data</title>
      <link>https://community.qlik.com/t5/QlikView/Bucket-Rank-ed-Data/m-p/1291820#M403792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your database do you have the sales/value aggregated at customer level or do you have multiple rows for each customer which needs to be aggregated on the front end? Based on your sample, you only had one row for each customer, there is a QV12 solution which I can propose to get to this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/144917_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Aggr(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(RangeSum(Above(TOTAL Sum(Value), 0, RowNo(TOTAL))) &amp;lt; 1*Sum(TOTAL Value)/10, 1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(RangeSum(Above(TOTAL Sum(Value), 0, RowNo(TOTAL))) &amp;lt; 2*Sum(TOTAL Value)/10, 2,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(RangeSum(Above(TOTAL Sum(Value), 0, RowNo(TOTAL))) &amp;lt; 3*Sum(TOTAL Value)/10, 3,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(RangeSum(Above(TOTAL Sum(Value), 0, RowNo(TOTAL))) &amp;lt; 4*Sum(TOTAL Value)/10, 4,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(RangeSum(Above(TOTAL Sum(Value), 0, RowNo(TOTAL))) &amp;lt; 5*Sum(TOTAL Value)/10, 5,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(RangeSum(Above(TOTAL Sum(Value), 0, RowNo(TOTAL))) &amp;lt; 6*Sum(TOTAL Value)/10, 6,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(RangeSum(Above(TOTAL Sum(Value), 0, RowNo(TOTAL))) &amp;lt; 7*Sum(TOTAL Value)/10, 7,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(RangeSum(Above(TOTAL Sum(Value), 0, RowNo(TOTAL))) &amp;lt; 8*Sum(TOTAL Value)/10, 8,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(RangeSum(Above(TOTAL Sum(Value), 0, RowNo(TOTAL))) &amp;lt; 9*Sum(TOTAL Value)/10, 9, 10)))))))))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;, &lt;SPAN style="color: #ff0000;"&gt;(&lt;/SPAN&gt;Value&lt;SPAN style="color: #ff0000;"&gt;,(NUMERIC, DESCENDING))&lt;/SPAN&gt;, Value)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count(DISTINCT Customer)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum(Value)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension uses a concept which is only available in QlikView 12. &lt;A href="https://community.qlik.com/qlik-blogpost/4673"&gt;The sortable Aggr function is finally here!&lt;/A&gt;‌. This concept allowed me to sort the customer descending by Value. But this only worked because the data was already aggregated. There is still no way to sort by an expression such as Sum(Value) which would be needed if you data is not aggregated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know what you think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Nov 2016 12:28:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bucket-Rank-ed-Data/m-p/1291820#M403792</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-11-26T12:28:13Z</dc:date>
    </item>
  </channel>
</rss>

