<?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: Rank - Ingoring Selections in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rank-Ingoring-Selections/m-p/562522#M209941</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks for your quick response, this is very useful!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I have now stupidly realised that I need to be able to take into account some other selections, such as year. For example, if Supplier 2 was ranked number 4 overall, but number 2 in 2012, I would want this to show as rank 2 when selecting Supplier 2 and 2012.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way of factorign this into the expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Sep 2013 15:19:50 GMT</pubDate>
    <dc:creator>danielle_v</dc:creator>
    <dc:date>2013-09-03T15:19:50Z</dc:date>
    <item>
      <title>Rank - Ingoring Selections</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Ingoring-Selections/m-p/562519#M209938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use the rank function in order to produce a 'supplier scorecard'.&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;&lt;STRONG&gt;Supplier&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;Sales&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;Rank&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1000&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;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;500&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2000&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;D&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;250&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;In the above example, I have used the rank function in order to rank the suppliers by sum(Sales). So, supplier B is ranked 3 out of 4 suppliers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the problem comes when I want to be able to select just one supplier to view just their data. If selecting supplier B, I would just want to see the following;&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;&lt;STRONG&gt;Supplier&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;Sales&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;Rank&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;500&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, in my application this is showing rank 1 - I assume this is becuase by selecting the supplier, I am effectively ranking supplier B as 1 of 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried using TOTAL, but just can't get this to work as I want it to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help greatly appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 13:16:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Ingoring-Selections/m-p/562519#M209938</guid>
      <dc:creator>danielle_v</dc:creator>
      <dc:date>2013-09-03T13:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Rank - Ingoring Selections</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Ingoring-Selections/m-p/562520#M209939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of using rank(), create a variable (such as vSales) with the following expression:&lt;/P&gt;&lt;P&gt;=concat({1}aggr(sum({1}Sales), Supplier), ',', -aggr(sum({1}Sales), Supplier))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, replace the rank() expression on your chart with:&lt;/P&gt;&lt;P&gt;SubstringCount(left(vSales, index(vSales, sum(Sales))), ',')+1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached for working .qvw file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 14:44:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Ingoring-Selections/m-p/562520#M209939</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2013-09-03T14:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Rank - Ingoring Selections</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Ingoring-Selections/m-p/562521#M209940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using&amp;nbsp; aggr() .&lt;/P&gt;&lt;PRE __default_attr="xml" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13782195135211377" jivemacro_uid="_13782195135211377"&gt;
&lt;P&gt;aggr( rank(total sum({1} [Sales])),[Supplier])&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;See attached example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 14:44:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Ingoring-Selections/m-p/562521#M209940</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2013-09-03T14:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Rank - Ingoring Selections</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Ingoring-Selections/m-p/562522#M209941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks for your quick response, this is very useful!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I have now stupidly realised that I need to be able to take into account some other selections, such as year. For example, if Supplier 2 was ranked number 4 overall, but number 2 in 2012, I would want this to show as rank 2 when selecting Supplier 2 and 2012.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way of factorign this into the expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 15:19:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Ingoring-Selections/m-p/562522#M209941</guid>
      <dc:creator>danielle_v</dc:creator>
      <dc:date>2013-09-03T15:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Rank - Ingoring Selections</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Ingoring-Selections/m-p/562523#M209942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of using the &amp;lt;1&amp;gt; you can use $ with a modifier, explicit canceling all dimension selections except the ones you want to keep. In your case the supplier.&lt;/P&gt;&lt;P&gt;aggr( rank(total&amp;nbsp; sum({$&amp;lt;dim1=, dim2=, dim3= &amp;gt;} [Sales])),[Supplier])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 15:34:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Ingoring-Selections/m-p/562523#M209942</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2013-09-03T15:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Rank - Ingoring Selections</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Ingoring-Selections/m-p/562524#M209943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is exactly what I need, thank you so much for your help!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 15:48:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Ingoring-Selections/m-p/562524#M209943</guid>
      <dc:creator>danielle_v</dc:creator>
      <dc:date>2013-09-03T15:48:29Z</dc:date>
    </item>
  </channel>
</rss>

