<?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 Difference Across Years in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297357#M827263</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Wallo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you. Unfortunately i am using QV Personal Edition and thus am unable to access the QVW posted by you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can post the script / expressions then that would be helpful.&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>Wed, 12 Jul 2017 23:00:46 GMT</pubDate>
    <dc:creator>coolwaters</dc:creator>
    <dc:date>2017-07-12T23:00:46Z</dc:date>
    <item>
      <title>Rank Difference Across Years</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297344#M827239</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;I have sales data of customers across years. I need to get the rank of the customer by the year and then get the difference in the rank between two years. ie. If the customer has moved up or down etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to achieve the output as per the below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Rank Report.png" class="jive-image image-1" src="/legacyfs/online/169993_Rank Report.png" style="height: 102px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have attached the sample data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Am using QV 11.20 personal edition thus please post the script and the expressions for the solution as will not be able to access other QVW's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297344#M827239</guid>
      <dc:creator>coolwaters</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Difference Across Years</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297345#M827240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Customer, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[..\..\Downloads\Rank.xlsx]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Straight Table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Customer&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expressions&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;Year = {$(=Min(Year))}&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Sum({&amp;lt;Year = {$(=Min(Year))}&amp;gt;}Sales) &amp;gt; 0, Rank(Sum({&amp;lt;Year = {$(=Min(Year))}&amp;gt;}Sales), 3))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;Year = {$(=Max(Year))}&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Sum({&amp;lt;Year = {$(=Max(Year))}&amp;gt;}Sales) &amp;gt; 0, Rank(Sum({&amp;lt;Year = {$(=Max(Year))}&amp;gt;}Sales), 3))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Column(2) - Column(4)&lt;/STRONG&gt;&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/170001_Capture.PNG" style="height: 197px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Attaching the qvw for other visitiors&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 15:28:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297345#M827240</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-07-12T15:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Difference Across Years</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297346#M827242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cool,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=rank(Sum(Sales),1,1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gives this pivot table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TH bgcolor="#f5f5f5" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Customer&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH bgcolor="#f5f5f5" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Year&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2014&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2016&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2017&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Customer A&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt; &lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Customer B&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt; &lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;4&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Customer C&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt; &lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;4&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;4&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Customer D&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt; &lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;3&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Customer E&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt; &lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;4&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rank(sum({$&amp;lt;Year={$(=-3+max(Year))}&amp;gt;}Sales),1,1)&lt;/P&gt;&lt;P&gt;&amp;amp; '=&amp;gt;' &amp;amp;&lt;/P&gt;&lt;P&gt;Rank(sum({$&amp;lt;Year={$(=-2+max(Year))}&amp;gt;}Sales),1,1)&lt;/P&gt;&lt;P&gt;&amp;amp; '=&amp;gt;' &amp;amp;&lt;/P&gt;&lt;P&gt;Rank(sum({$&amp;lt;Year={$(=-1+max(Year))}&amp;gt;}Sales),1,1)&lt;/P&gt;&lt;P&gt;&amp;amp; '=&amp;gt;' &amp;amp;&lt;/P&gt;&lt;P&gt;Rank(sum({$&amp;lt;Year={$(=max(Year))}&amp;gt;}Sales),1,1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gives this straight table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Customer&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Y to Y&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Customer A&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2=&amp;gt;1=&amp;gt;2=&amp;gt;1&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Customer B&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2=&amp;gt;3=&amp;gt;2=&amp;gt;4&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Customer C&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;4=&amp;gt;2=&amp;gt;1=&amp;gt;4&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Customer D&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1=&amp;gt;3=&amp;gt;2=&amp;gt;3&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Customer E&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;4=&amp;gt;3=&amp;gt;2=&amp;gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 15:38:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297346#M827242</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-07-12T15:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Difference Across Years</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297347#M827244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. I also need to mention 'NOT IN' followed by the YEAR in the chart as per the image attached.&lt;/P&gt;&lt;P&gt;Can you help me get that too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 15:42:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297347#M827244</guid>
      <dc:creator>coolwaters</dc:creator>
      <dc:date>2017-07-12T15:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Difference Across Years</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297348#M827245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. I also need to mention 'NOT IN' followed by the YEAR in the chart as per the image attached.&lt;/P&gt;&lt;P&gt;Can you help me get that too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also for eg. Customer B has sales only in 2014, thus for what i am trying to do there should be no rank for the customer in the years where there is no sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 15:42:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297348#M827245</guid>
      <dc:creator>coolwaters</dc:creator>
      <dc:date>2017-07-12T15:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Difference Across Years</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297349#M827247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Expressions :&lt;/P&gt;&lt;P&gt;Sum(Sales)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;SPAN style="color: #0000ff;"&gt;SecondaryDimensionality&lt;/SPAN&gt;() &amp;gt; 0,&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Sum&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;)=0,'NOT IN YEAR',&lt;SPAN style="color: #0000ff;"&gt;Rank&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Sum&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;))),&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Sum&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;Year&lt;/SPAN&gt;={'$(=Min(Year))'}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;)=0,'NOT IN '&amp;amp;&lt;SPAN style="color: #0000ff;"&gt;Min&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Year&lt;/SPAN&gt;),&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Sum&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;Year&lt;/SPAN&gt;={'$(=Max(Year))'}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;)=0,'NOT IN '&amp;amp;&lt;SPAN style="color: #0000ff;"&gt;Max&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Year&lt;/SPAN&gt;),&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;Rank&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Sum&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;Year&lt;/SPAN&gt;={'$(=Min(Year))'}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;),0,1)-&lt;SPAN style="color: #0000ff;"&gt;Rank&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Sum&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;Year&lt;/SPAN&gt;={'$(=Max(Year))'}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;),0,1)))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/170015_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Antonio&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 15:52:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297349#M827247</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2017-07-12T15:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Difference Across Years</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297350#M827249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cool,&lt;/P&gt;&lt;P&gt;How about:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TH bgcolor="#f5f5f5" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Year&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TD bgcolor="#ffffff" colspan="3"&gt;&lt;SPAN style="color: #363636;"&gt;2014&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" colspan="3"&gt;&lt;SPAN style="color: #363636;"&gt;2017&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TH bgcolor="#f5f5f5" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Customer&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Sales&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Rank&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Rank change&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Sales&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Rank&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Rank change&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Customer A&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt; &lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2800&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;+1&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Customer B&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt; &lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;0&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Not in 2017&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;-2&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Customer D&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2500&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt; &lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;-2&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Customer E&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;0&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Not in 2014&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt; &lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2500&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;+2&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rank: if(Sum(Sales) &amp;gt;0,rank(Sum(Sales),1,1), 'Not in ' &amp;amp; Year)&lt;/P&gt;&lt;P&gt;Rank change: Before(rank(Sum(Sales),1,1)) - rank(Sum(Sales),1,1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Format the number return by Rank change to get +/-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;good luck&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 16:00:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297350#M827249</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-07-12T16:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Difference Across Years</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297351#M827251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Expressions&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;Year = {$(=Min(Year))}&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Sum({&amp;lt;Year = {$(=Min(Year))}&amp;gt;}Sales) &amp;gt; 0, Rank(Sum({&amp;lt;Year = {$(=Min(Year))}&amp;gt;}Sales), 3), 'NOT IN ' &amp;amp; Min(TOTAL Year))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;Year = {$(=Max(Year))}&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Sum({&amp;lt;Year = {$(=Max(Year))}&amp;gt;}Sales) &amp;gt; 0, Rank(Sum({&amp;lt;Year = {$(=Max(Year))}&amp;gt;}Sales), 3), 'NOT IN ' &amp;amp; Max(TOTAL Year))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Sum({&amp;lt;Year = {$(=Min(Year))}&amp;gt;}Sales) = 0 and Sum({&amp;lt;Year = {$(=Max(Year))}&amp;gt;}Sales) = 0, 'NOT IN ' &amp;amp; Min(TOTAL Year) &amp;amp; ' and ' &amp;amp; Max(TOTAL Year),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; If(Sum({&amp;lt;Year = {$(=Min(Year))}&amp;gt;}Sales) = 0, 'NOT IN ' &amp;amp; Min(TOTAL Year),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; If(Sum({&amp;lt;Year = {$(=Max(Year))}&amp;gt;}Sales) = 0, 'NOT IN ' &amp;amp; Max(TOTAL Year), Column(2) - Column(4))))&lt;/STRONG&gt;&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/170014_Capture.PNG" style="height: 71px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 16:06:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297351#M827251</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-07-12T16:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Difference Across Years</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297352#M827253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Antonio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for taking the time out and for the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just one thing. If i pass the two years as variables and not as selections in the list box then the problem i am facing is that Customer B that has no sales in either of the two years that is 2014 &amp;amp; 2017 still shows up in the chart. &lt;/P&gt;&lt;P&gt;There are a lot of customers like this thus i end up having the customer name and 0 as sales for them for both the years.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also if i select any customer in the list box the rank for the customer changes how can i include AGGR or Total&amp;nbsp; or another solution in the expression to avoid this.&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>Wed, 12 Jul 2017 16:08:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297352#M827253</guid>
      <dc:creator>coolwaters</dc:creator>
      <dc:date>2017-07-12T16:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Difference Across Years</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297353#M827255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) Why the behavior sould change ?&lt;/P&gt;&lt;P&gt;2) I think You must achieve this in Script (like TableOfAs)&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Antonio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 16:39:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297353#M827255</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2017-07-12T16:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Difference Across Years</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297354#M827257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the solutions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find attached the qvw of what i am doing, have taken inputs from Sunny's solution as am trying to work with a straight table !. The issue i am facing is Customer C should not be in the chart at all as there is no sales for this customer in either of the years the analysis is being done on. And there as variables being used for assigning the years.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know where i am going wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 20:33:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297354#M827257</guid>
      <dc:creator>coolwaters</dc:creator>
      <dc:date>2017-07-12T20:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Difference Across Years</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297355#M827259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am CERTAIN there are other ways.&lt;/P&gt;&lt;P&gt;But here is 1 way based on what you provided.&lt;/P&gt;&lt;P&gt;It uses dimension limits and a hidden expression that must be the first expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 20:41:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297355#M827259</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-12T20:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Difference Across Years</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297356#M827261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did not look at Wallo's solution, but here might be another way...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;Year = {$(vYearFrom)}&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Column(1) &amp;lt;&amp;gt; 0 or Column(3) &amp;lt;&amp;gt; 0, If(Sum({&amp;lt;Year = {$(vYearFrom)}&amp;gt;}Sales) &amp;gt; 0, Rank(Sum({&amp;lt;Year = {$(vYearFrom)}&amp;gt;}Sales), 3), 'NOT IN ' &amp;amp; $(vYearFrom)))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;Year = {$(vYearTo)}&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Column(1) &amp;lt;&amp;gt; 0 or Column(3) &amp;lt;&amp;gt; 0, If(Sum({&amp;lt;Year = {$(vYearTo)}&amp;gt;}Sales) &amp;gt; 0, Rank(Sum({&amp;lt;Year = {$(vYearTo)}&amp;gt;}Sales), 3), 'NOT IN ' &amp;amp; $(vYearTo)))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Column(1) &amp;lt;&amp;gt; 0 or Column(3) &amp;lt;&amp;gt; 0, If(SecondaryDimensionality() &amp;gt; 0,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Sum(Sales)=0,'NOT IN YEAR',Rank(Sum(Sales))),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Sum({&amp;lt;Year={'$(=Min(Year))'}&amp;gt;} Sales)=0,'NOT IN '&amp;amp;Min(Year),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Sum({&amp;lt;Year={'$(=Max(Year))'}&amp;gt;} Sales)=0,'NOT IN '&amp;amp;Max(Year),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Rank(Sum({&amp;lt;Year={'$(=Min(Year))'}&amp;gt;} Sales),0,1)-Rank(Sum({&amp;lt;Year={'$(=Max(Year))'}&amp;gt;} Sales),0,1)))))&lt;/STRONG&gt;&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/170052_Capture.PNG" style="height: 131px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 22:30:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297356#M827261</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-07-12T22:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Difference Across Years</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297357#M827263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Wallo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you. Unfortunately i am using QV Personal Edition and thus am unable to access the QVW posted by you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can post the script / expressions then that would be helpful.&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>Wed, 12 Jul 2017 23:00:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297357#M827263</guid>
      <dc:creator>coolwaters</dc:creator>
      <dc:date>2017-07-12T23:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Difference Across Years</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297358#M827265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works, just one thing. When a customer is selected then the rank changes based on the selection. Thus can we include Aggr or something else to stop that from happening.&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>Wed, 12 Jul 2017 23:02:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297358#M827265</guid>
      <dc:creator>coolwaters</dc:creator>
      <dc:date>2017-07-12T23:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Difference Across Years</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297359#M827266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here are the new expressions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;Year = {$(vYearFrom)}&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Column(1) &amp;lt;&amp;gt; 0 or Column(3) &amp;lt;&amp;gt; 0, If(Sum({&amp;lt;Year = {$(vYearFrom)}, Customer&amp;gt;}Sales) &amp;gt; 0, Rank(Sum({&amp;lt;Year = {$(vYearFrom)}, Customer&amp;gt;}Sales), 3), 'NOT IN ' &amp;amp; $(vYearFrom)))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;Year = {$(vYearTo)}&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Column(1) &amp;lt;&amp;gt; 0 or Column(3) &amp;lt;&amp;gt; 0, If(Sum({&amp;lt;Year = {$(vYearTo)}, Customer&amp;gt;}Sales) &amp;gt; 0, Rank(Sum({&amp;lt;Year = {$(vYearTo)}, Customer&amp;gt;}Sales), 3), 'NOT IN ' &amp;amp; $(vYearTo)))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Column(1) &amp;lt;&amp;gt; 0 or Column(3) &amp;lt;&amp;gt; 0, If(SecondaryDimensionality() &amp;gt; 0,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Sum({&amp;lt;Customer&amp;gt;}Sales)=0,'NOT IN YEAR',Rank(Sum({&amp;lt;Customer&amp;gt;}Sales))),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Sum({&amp;lt;Year = {$(vYearFrom)}, Customer&amp;gt;} Sales)=0,'NOT IN '&amp;amp;$(vYearFrom),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Sum({&amp;lt;Year = {$(vYearTo)}, Customer&amp;gt;} Sales)=0,'NOT IN '&amp;amp;$(vYearTo),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Rank(Sum({&amp;lt;Year={$(vYearFrom)}, Customer&amp;gt;} Sales),0,1)-Rank(Sum({&amp;lt;Year = {$(vYearTo)}, Customer&amp;gt;} Sales),0,1)))))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 23:11:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297359#M827266</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-07-12T23:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Difference Across Years</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297360#M827267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a ton.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Works well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For my understanding please explain the use of 3 in the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rank(Sum({&amp;lt;Year = {$(vYearFrom)}, Customer&amp;gt;}Sales), &lt;STRONG&gt;3&lt;/STRONG&gt;), 'NOT IN ' &amp;amp; $(vYearFrom)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 23:18:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297360#M827267</guid>
      <dc:creator>coolwaters</dc:creator>
      <dc:date>2017-07-12T23:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Rank Difference Across Years</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297361#M827268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for taking the time out to help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate it, always.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 23:19:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Difference-Across-Years/m-p/1297361#M827268</guid>
      <dc:creator>coolwaters</dc:creator>
      <dc:date>2017-07-12T23:19:33Z</dc:date>
    </item>
  </channel>
</rss>

