<?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: Sort not working as expected with rank in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Sort-not-working-as-expected-with-rank/m-p/2413081#M94823</link>
    <description>&lt;P&gt;If you want the ranking to be calculated over all products and categories, you can use Aggr() with both dimensions:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LRuCelver_0-1706708713639.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158764iD28AC03BDEFDD396/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LRuCelver_0-1706708713639.png" alt="LRuCelver_0-1706708713639.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Aggr(Rank(total ProductSales, 4), Product, Category)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 31 Jan 2024 13:48:34 GMT</pubDate>
    <dc:creator>LRuCelver</dc:creator>
    <dc:date>2024-01-31T13:48:34Z</dc:date>
    <item>
      <title>Sort not working as expected with rank</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-not-working-as-expected-with-rank/m-p/2412596#M94760</link>
      <description>&lt;P&gt;I have applied ranking of sum(sales) by item. There are some products in more than one category (Product F below). The ranking seems to be arbitrarily applied to the product in the category with lower sales and is displaying that product first when I sort by rank ascending and then product sales desc.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kadzema_0-1706624205733.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158645i343A2606788CDCAA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kadzema_0-1706624205733.png" alt="kadzema_0-1706624205733.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If i change the sort to product sales desc and then rank I get the below which then doesn't show the rank where i would like to see it:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kadzema_1-1706624409452.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158646i64B97C2E9E5B8C51/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kadzema_1-1706624409452.png" alt="kadzema_1-1706624409452.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here is what I would like to see:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kadzema_2-1706624491990.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158648i97198EB03388A166/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kadzema_2-1706624491990.png" alt="kadzema_2-1706624491990.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Note that with my small sample data, I am seeing the expected results.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What could be happening to cause this and how can I fix it?&lt;/P&gt;
&lt;P&gt;Many thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 14:32:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-not-working-as-expected-with-rank/m-p/2412596#M94760</guid>
      <dc:creator>kadzema</dc:creator>
      <dc:date>2024-01-30T14:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Sort not working as expected with rank</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-not-working-as-expected-with-rank/m-p/2413081#M94823</link>
      <description>&lt;P&gt;If you want the ranking to be calculated over all products and categories, you can use Aggr() with both dimensions:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LRuCelver_0-1706708713639.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158764iD28AC03BDEFDD396/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LRuCelver_0-1706708713639.png" alt="LRuCelver_0-1706708713639.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Aggr(Rank(total ProductSales, 4), Product, Category)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 13:48:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-not-working-as-expected-with-rank/m-p/2413081#M94823</guid>
      <dc:creator>LRuCelver</dc:creator>
      <dc:date>2024-01-31T13:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Sort not working as expected with rank</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-not-working-as-expected-with-rank/m-p/2413155#M94829</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/285770"&gt;@LRuCelver&lt;/a&gt;&amp;nbsp;- adding total was the key! without, each product had it's own rank. My understanding is that aggregate is saying to use these dimensions and total says to ignore the dimensions. Can you please break down for me in pseudocode how this is interpreted?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 15:41:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-not-working-as-expected-with-rank/m-p/2413155#M94829</guid>
      <dc:creator>kadzema</dc:creator>
      <dc:date>2024-01-31T15:41:15Z</dc:date>
    </item>
  </channel>
</rss>

