<?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: Re: Re: Aggregation over sub dimensions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700799#M252962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check the expression for taht solution:-&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;&lt;STRONG&gt;=aggr&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 12pt;"&gt;(&lt;SPAN style="color: #0000ff;"&gt;rank&lt;/SPAN&gt;(-&lt;SPAN style="color: #800000;"&gt;[Lead time (days)]&lt;/SPAN&gt;),&lt;SPAN style="color: #800000;"&gt;SKU&lt;/SPAN&gt;,&lt;SPAN style="color: #800000;"&gt;[Order #]&lt;/SPAN&gt;) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt;"&gt;I think you want the result like this:-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Oct 2014 10:34:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-10-10T10:34:28Z</dc:date>
    <item>
      <title>Aggregation over sub dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700793#M252956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;OL style="list-style-type: upper-alpha;"&gt;&lt;LI&gt;Greetings.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a feeling the answer involves the Aggr() function; however, as yet I can not get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table similar to the example below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Order #&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;SKU&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Lead time (days)&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Rank&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;169339&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1112&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;70&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;169339&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2231&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;111&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;169339&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3451&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;141&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;169339&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3566&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;166&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;169339&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;8582&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;89&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;178040&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1112&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;58&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;178040&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2231&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;71&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;171193&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1112&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;60&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;178111&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1112&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;121&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can perform ranking and averaging etc on the table when I have one SKU selected, but when the selection is removed the ranking and average refers to all data displayed in that column (as shown above).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to achieve is have an unfiltered table but show the ranking etc per SKU. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Order #&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;SKU&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Lead time (days)&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Rank&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;169339&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1112&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;70&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;169339&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2231&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;111&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;169339&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3451&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;141&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;169339&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3566&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;166&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;169339&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;8582&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;89&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;178040&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1112&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;58&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;178040&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2231&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;71&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;171193&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1112&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;60&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;178111&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1112&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;121&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can anyone help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 08:16:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700793#M252956</guid>
      <dc:creator />
      <dc:date>2014-10-10T08:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregation over sub dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700794#M252957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aggr(Rank([Lead time]),SKU)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 08:27:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700794#M252957</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2014-10-10T08:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregation over sub dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700795#M252958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please use this expression for solution:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;aggr&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;rank&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;[Lead time (days)]&lt;/SPAN&gt;),&lt;SPAN style="color: #800000;"&gt;SKU&lt;/SPAN&gt;,&lt;SPAN style="color: #800000;"&gt;[Order #]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;And also find the attached QVW .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 09:07:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700795#M252958</guid>
      <dc:creator />
      <dc:date>2014-10-10T09:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Aggregation over sub dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700796#M252959</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;Firstly - Thanks to everybody for their advice&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached an example and for unknown reasons your suggestion (which works in your example) acts differently in mine???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They are basically the same but I am unable to spot what's wrong...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 09:58:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700796#M252959</guid>
      <dc:creator />
      <dc:date>2014-10-10T09:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Aggregation over sub dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700797#M252960</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;Thank you for your advice.&amp;nbsp; I have now attached an example in reply to Prince Anand.&amp;nbsp; This didn't quite solve my problem but I think it is a step in the right direction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 10:01:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700797#M252960</guid>
      <dc:creator />
      <dc:date>2014-10-10T10:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Aggregation over sub dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700798#M252961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Only difference is that It is giving result in Descending Order but&lt;/P&gt;&lt;P&gt;I think you want the result in Ascending Order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Prince Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 10:27:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700798#M252961</guid>
      <dc:creator />
      <dc:date>2014-10-10T10:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Aggregation over sub dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700799#M252962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check the expression for taht solution:-&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;&lt;STRONG&gt;=aggr&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 12pt;"&gt;(&lt;SPAN style="color: #0000ff;"&gt;rank&lt;/SPAN&gt;(-&lt;SPAN style="color: #800000;"&gt;[Lead time (days)]&lt;/SPAN&gt;),&lt;SPAN style="color: #800000;"&gt;SKU&lt;/SPAN&gt;,&lt;SPAN style="color: #800000;"&gt;[Order #]&lt;/SPAN&gt;) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt;"&gt;I think you want the result like this:-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 10:34:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700799#M252962</guid>
      <dc:creator />
      <dc:date>2014-10-10T10:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Aggregation over sub dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700800#M252963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The difference I am talking about is that the table on the left has more results visible.&amp;nbsp; For example, using this expression I am losing all results for SKU 3487 and only getting partial results for 1123...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to play with the aggr() function but not arrived at the desired result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;Oli&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 10:36:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700800#M252963</guid>
      <dc:creator />
      <dc:date>2014-10-10T10:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Aggregation over sub dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700801#M252964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this&lt;/P&gt;&lt;H5&gt;=aggr(rank(total [Lead time (days)],0,1),[Lead time (days)], SKU,[Order #])&lt;/H5&gt;&lt;P&gt;which shows all the results but I am back to the rank being for the whole table not per SKU/Lead time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also - when I removed the total from the rank formula I get all lines as rank 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 10:40:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700801#M252964</guid>
      <dc:creator />
      <dc:date>2014-10-10T10:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Aggregation over sub dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700802#M252965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this qvw&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Alt(aggr(rank(-[Lead time (days)]),SKU,[Lead time (days)]),Above(aggr(rank(-[Lead time (days)]),SKU,[Lead time (days)])))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 11:05:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700802#M252965</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2014-10-10T11:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Aggregation over sub dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700803#M252966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anbu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help. &lt;SPAN style="text-decoration: line-through;"&gt; I am looking in the QlikView help file but can't yet figure out how your solution works.&amp;nbsp; As I am trying to learn from this could you briefly explain how this expression works?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I right in thinking that this:&lt;/P&gt;&lt;H4&gt;aggr(rank(-[Lead time (days)]),SKU,[Lead time (days)])&lt;/H4&gt;&lt;P&gt;returns the ranking, while the rest of the alt() and above() have been used to fix the sort order??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and kind regards&lt;/P&gt;&lt;P&gt;Oli&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 11:22:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700803#M252966</guid>
      <dc:creator />
      <dc:date>2014-10-10T11:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Aggregation over sub dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700804#M252967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;aggr(rank(-[Lead time (days)]),SKU,[Lead time (days)])&amp;nbsp; &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;- Aggr on &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;SKU,[Lead time (days)] creates a table like below in memory. Aggr is used to ignore your other dimension Order # while ranking&lt;/SPAN&gt;&lt;BR /&gt;&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;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;THEAD style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; color: #ffffff; background-color: #6690bc; background-position: no-repeat;" valign="middle"&gt;SKU&lt;/TH&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; color: #ffffff; background-color: #6690bc; background-position: no-repeat;" valign="middle"&gt;Lead time (days)&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;1112&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;70&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;2231&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;111&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;3451&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;141&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;3566&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;166&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;8582&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;89&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;1112&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;58&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;2231&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;71&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;1112&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;60&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;1112&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit;"&gt;121&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&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="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;- Then Rank is calcuated on &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[Lead time (days)] based on above data.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Lead time, Rank&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;58, 1&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;60, 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;70, 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;121, 4&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Rank of negative Lead time&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Lead time, Rank&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;-58, 4&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;-60, 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;-70, 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;-121, 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Alt( expr, Above(expr)) - Alt returns value of expr which provides non-null value. In our case, Rank generates null value, if you have same Lead times. So Alt is used to return to same rank from the above row&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 11:46:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700804#M252967</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2014-10-10T11:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregation over sub dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700805#M252968</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;Generating rank in script&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;Initial:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD [Order #],&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SKU,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Lead time (days)],&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Desired result]&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(biff, embedded labels, table is Sheet1$);&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;NoConcatenate&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Final:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load *,If(SKU = Previous(SKU) And [Lead time (days)] = Previous([Lead time (days)]),Peek(Rnk1),Rnk) As Rnk1;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load *,AutoNumber(RecNo(),SKU) As Rnk Resident Initial Order by SKU,[Lead time (days)];&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;Drop table Initial;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 12:00:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-over-sub-dimensions/m-p/700805#M252968</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2014-10-10T12:00:27Z</dc:date>
    </item>
  </channel>
</rss>

