<?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 Ranking Range in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2004734#M83161</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can create either a table or pivot table which has columns&lt;/P&gt;
&lt;P&gt;Team,&amp;nbsp; Measure, Rank based on Measure&lt;/P&gt;
&lt;P&gt;e.g.&lt;/P&gt;
&lt;P&gt;Team 3,&amp;nbsp; &amp;nbsp;15,&amp;nbsp; &amp;nbsp;1&lt;/P&gt;
&lt;P&gt;Team 1,&amp;nbsp; &amp;nbsp;17,&amp;nbsp; &amp;nbsp;2&lt;/P&gt;
&lt;P&gt;Team 5,&amp;nbsp; &amp;nbsp;25,&amp;nbsp; &amp;nbsp;3&lt;/P&gt;
&lt;P&gt;Team 4,&amp;nbsp; &amp;nbsp;34,&amp;nbsp; &amp;nbsp;4&lt;/P&gt;
&lt;P&gt;Team 6,&amp;nbsp; &amp;nbsp;54,&amp;nbsp; &amp;nbsp;5&lt;/P&gt;
&lt;P&gt;Team 2,&amp;nbsp; &amp;nbsp;75,&amp;nbsp; &amp;nbsp;6&lt;/P&gt;
&lt;P&gt;If Team is selected as a filter, is there a way of just displaying&amp;nbsp; the selected Team and the Team above and below the selected Team.&lt;/P&gt;
&lt;P&gt;We're looking to NPrint a report to various teams and show a snapshot&amp;nbsp; of their rankings against their nearest competitors, say 5 teams above and below their own ranking.&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Nov 2022 14:33:13 GMT</pubDate>
    <dc:creator>RichardSmith</dc:creator>
    <dc:date>2022-11-15T14:33:13Z</dc:date>
    <item>
      <title>Ranking Range</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2004734#M83161</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can create either a table or pivot table which has columns&lt;/P&gt;
&lt;P&gt;Team,&amp;nbsp; Measure, Rank based on Measure&lt;/P&gt;
&lt;P&gt;e.g.&lt;/P&gt;
&lt;P&gt;Team 3,&amp;nbsp; &amp;nbsp;15,&amp;nbsp; &amp;nbsp;1&lt;/P&gt;
&lt;P&gt;Team 1,&amp;nbsp; &amp;nbsp;17,&amp;nbsp; &amp;nbsp;2&lt;/P&gt;
&lt;P&gt;Team 5,&amp;nbsp; &amp;nbsp;25,&amp;nbsp; &amp;nbsp;3&lt;/P&gt;
&lt;P&gt;Team 4,&amp;nbsp; &amp;nbsp;34,&amp;nbsp; &amp;nbsp;4&lt;/P&gt;
&lt;P&gt;Team 6,&amp;nbsp; &amp;nbsp;54,&amp;nbsp; &amp;nbsp;5&lt;/P&gt;
&lt;P&gt;Team 2,&amp;nbsp; &amp;nbsp;75,&amp;nbsp; &amp;nbsp;6&lt;/P&gt;
&lt;P&gt;If Team is selected as a filter, is there a way of just displaying&amp;nbsp; the selected Team and the Team above and below the selected Team.&lt;/P&gt;
&lt;P&gt;We're looking to NPrint a report to various teams and show a snapshot&amp;nbsp; of their rankings against their nearest competitors, say 5 teams above and below their own ranking.&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 14:33:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2004734#M83161</guid>
      <dc:creator>RichardSmith</dc:creator>
      <dc:date>2022-11-15T14:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Range</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2005019#M83175</link>
      <description>&lt;P&gt;As below&lt;/P&gt;
&lt;P&gt;load * inline [&lt;BR /&gt;Team,Amt,Rank&lt;BR /&gt;Team 3,15,1&lt;/P&gt;
&lt;P&gt;Team 1,17,2&lt;/P&gt;
&lt;P&gt;Team 5,25,3&lt;/P&gt;
&lt;P&gt;Team 4,34,4&lt;/P&gt;
&lt;P&gt;Team 6,54,5&lt;/P&gt;
&lt;P&gt;Team 2,75,6&lt;BR /&gt;];&lt;BR /&gt;exit Script;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;In Chart:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Dimension&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;=Team&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Measures&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Above 2 &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;=if(rank(sum({1}Amt),4,2) &amp;gt;= if(getselectedcount(Team),sum(total aggr(distinct rank( sum({1}Amt),4,2),Team))-2,1)&lt;BR /&gt;and&lt;BR /&gt;rank(sum({1}Amt),4,2) &amp;lt;= sum(total aggr(distinct rank( sum({1}Amt),4,2),Team))&lt;BR /&gt;, rank(sum({1}Amt),4,2) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Below 2&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;if(rank(sum({1}Amt),4,2) &amp;gt;= sum(total aggr(distinct rank( sum({1}Amt),4,2),Team))&lt;BR /&gt;and&lt;BR /&gt;rank(sum({1}Amt),4,2) &amp;lt;= if(getselectedcount(Team),sum(total aggr(distinct rank( sum({1}Amt),4,2),Team))+2,1)&lt;BR /&gt;, rank(sum({1}Amt),4,2) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Selected Team 4 which is Rank 3 based on sum(Amt)&lt;/P&gt;
&lt;P&gt;Above 2 showing teams with rank 1,2,3&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Below 2 showing teams with rank 3,4,5&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 664px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/93825i45B7BC688F3D0C06/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 02:35:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2005019#M83175</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2022-11-16T02:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Range</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2005456#M83207</link>
      <description>&lt;P&gt;Thanks for taking the time to investigate and reply, much appreciated. There's a couple more hurdles to get over I think. I was doing the ranking in the chart, but I can do that within the load script. In the table above, I would also need the Amt to be shown and also, when the team is selected to not show the Team where there are Nulls in both the Above 2 and Below 2. I tried it myself without success. I tried adding your code around the Team and setting it to Null, but it didn't work.&lt;/P&gt;
&lt;P&gt;I guess another approach would be to try to replicate your Above 2 and Below 2 code also in the load script, and then the Team could be set to Null and ignored.&amp;nbsp; Pity there's nothing straight out of the box for this in Qlik!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 16:37:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2005456#M83207</guid>
      <dc:creator>RichardSmith</dc:creator>
      <dc:date>2022-11-16T16:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Range</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2005634#M83217</link>
      <description>&lt;P&gt;even in the above example i am not doing any calculations in the load script, the rank is calculated based on sum(Amt)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you post a sample app ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 06:17:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2005634#M83217</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2022-11-17T06:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Range</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2006977#M83319</link>
      <description>&lt;P&gt;Sorry, I am beginning to understand this a little more. Agreed, it can all be achieved on the chart. I'm struggling to replicate it with my own data. Here's an example ranking&lt;/P&gt;
&lt;P&gt;aggr(Rank(-Sum({$&amp;lt;New_Stock={Yes},Team=&amp;gt;}Quantity)/Sum({$&amp;lt;Team=&amp;gt;}Quantity)),Team)&lt;/P&gt;
&lt;P&gt;Could this be converted into a a similar Above 2, Below 2 code? I've tried to, but failed!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 12:00:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2006977#M83319</guid>
      <dc:creator>RichardSmith</dc:creator>
      <dc:date>2022-11-21T12:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Range</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2007365#M83356</link>
      <description>&lt;P&gt;&lt;BR /&gt;Above 2&lt;/P&gt;
&lt;P&gt;=if(rank(-(Sum({&amp;lt;New_Stock={'Yes'},Team=&amp;gt;}Quantity)/Sum({&amp;lt;Team=&amp;gt;}Quantity)),4,2) &amp;gt;= if(getselectedcount(Team),sum(total aggr(distinct rank( -(Sum({&amp;lt;New_Stock={'Yes'},Team=&amp;gt;}Quantity)/Sum({&amp;lt;Team=&amp;gt;}Quantity)),4,2),Team))-2,1)&lt;BR /&gt;and&lt;BR /&gt;rank(-(Sum({&amp;lt;New_Stock={'Yes'},Team=&amp;gt;}Quantity)/Sum({&amp;lt;Team=&amp;gt;}Quantity)),4,2) &amp;lt;= sum(total aggr(distinct rank( -(Sum({&amp;lt;New_Stock={'Yes'},Team=&amp;gt;}Quantity)/Sum({&amp;lt;Team=&amp;gt;}Quantity)),4,2),Team))&lt;BR /&gt;, rank(-(Sum({&amp;lt;New_Stock={'Yes'},Team=&amp;gt;}Quantity)/Sum({&amp;lt;Team=&amp;gt;}Quantity)),4,2) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below 2&lt;/P&gt;
&lt;P&gt;if(rank(-(Sum({&amp;lt;New_Stock={'Yes'},Team=&amp;gt;}Quantity)/Sum({&amp;lt;Team=&amp;gt;}Quantity)),4,2) &amp;gt;= sum(total aggr(distinct rank( -(Sum({&amp;lt;New_Stock={'Yes'},Team=&amp;gt;}Quantity)/Sum({&amp;lt;Team=&amp;gt;}Quantity)),4,2),Team))&lt;BR /&gt;and&lt;BR /&gt;rank(-(Sum({&amp;lt;New_Stock={'Yes'},Team=&amp;gt;}Quantity)/Sum({&amp;lt;Team=&amp;gt;}Quantity)),4,2) &amp;lt;= if(getselectedcount(Team),sum(total aggr(distinct rank( -(Sum({&amp;lt;New_Stock={'Yes'},Team=&amp;gt;}Quantity)/Sum({&amp;lt;Team=&amp;gt;}Quantity)),4,2),Team))+2,1)&lt;BR /&gt;, rank(-(Sum({&amp;lt;New_Stock={'Yes'},Team=&amp;gt;}Quantity)/Sum({&amp;lt;Team=&amp;gt;}Quantity)),4,2) )&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 05:51:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2007365#M83356</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2022-11-22T05:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Range</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2007522#M83365</link>
      <description>&lt;P&gt;Fantastic, it did the trick, thanks again for helping with this and posting a solution. One final question, is there an easy way to combine Above 2 and Below 2 into one column. It's not crucial as I think I should be able to manipulate this in NPrinting.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 11:01:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2007522#M83365</guid>
      <dc:creator>RichardSmith</dc:creator>
      <dc:date>2022-11-22T11:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Range</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2007553#M83367</link>
      <description>&lt;P&gt;As below&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=if(rank(-(Sum({&amp;lt;New_Stock={'Yes'},Team=&amp;gt;}Quantity)/Sum({&amp;lt;Team=&amp;gt;}Quantity)),4,2) &amp;gt;= if(getselectedcount(Team),sum(total aggr(distinct rank( -(Sum({&amp;lt;New_Stock={'Yes'},Team=&amp;gt;}Quantity)/Sum({&amp;lt;Team=&amp;gt;}Quantity)),4,2),Team))-2,1)&lt;/P&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;rank(-(Sum({&amp;lt;New_Stock={'Yes'},Team=&amp;gt;}Quantity)/Sum({&amp;lt;Team=&amp;gt;}Quantity)),4,2) &amp;lt;= if(getselectedcount(Team),sum(total aggr(distinct rank( -(Sum({&amp;lt;New_Stock={'Yes'},Team=&amp;gt;}Quantity)/Sum({&amp;lt;Team=&amp;gt;}Quantity)),4,2),Team))+2,1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;, rank(-(Sum({&amp;lt;New_Stock={'Yes'},Team=&amp;gt;}Quantity)/Sum({&amp;lt;Team=&amp;gt;}Quantity)),4,2) )&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 12:15:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2007553#M83367</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2022-11-22T12:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking Range</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2007555#M83368</link>
      <description>&lt;P&gt;Perfect, thank you&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 12:23:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-Range/m-p/2007555#M83368</guid>
      <dc:creator>RichardSmith</dc:creator>
      <dc:date>2022-11-22T12:23:36Z</dc:date>
    </item>
  </channel>
</rss>

