<?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: top n values in current month comparing to previous month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204115#M387186</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its not geeting yhe correct results&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Nov 2016 09:21:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-11-02T09:21:24Z</dc:date>
    <item>
      <title>top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204109#M387180</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;please help me out in &lt;/P&gt;&lt;P&gt;Comparing the current month top&amp;nbsp; n values to the previous months &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Nov 2016 20:16:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204109#M387180</guid>
      <dc:creator />
      <dc:date>2016-11-01T20:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204110#M387181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just a typo, perhaps. You're doing sum(country) instead of sum(Orders).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Nov 2016 20:39:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204110#M387181</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-11-01T20:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204111#M387182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As John, say you need change &lt;STRONG&gt;Country&lt;/STRONG&gt; by &lt;STRONG&gt;&lt;IMG alt="2016_11_01_21_48_59_Cortana.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/142634_2016_11_01_21_48_59_Cortana.png" style="height: 362px; width: 620px;" /&gt;Orders&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Nov 2016 20:50:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204111#M387182</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2016-11-01T20:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204112#M387183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi john i tried the other&amp;nbsp; way as well but no luck&lt;/P&gt;&lt;P&gt;Can u pls help me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 02:52:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204112#M387183</guid>
      <dc:creator />
      <dc:date>2016-11-02T02:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204113#M387184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didnt get that can you pls explain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 02:52:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204113#M387184</guid>
      <dc:creator />
      <dc:date>2016-11-02T02:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204114#M387185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your expression you have "country" and is "orders"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 04:08:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204114#M387185</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2016-11-02T04:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204115#M387186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its not geeting yhe correct results&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 09:21:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204115#M387186</guid>
      <dc:creator />
      <dc:date>2016-11-02T09:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204116#M387187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps like this:&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/142671_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;sum({&amp;lt;country={"=rank(Sum({&amp;lt;OrderDate={'&amp;gt;=$(MonthStart(Max(OrderDate))))&amp;lt;=$(=Date(Max(OrderDate)))'}&amp;gt;}Orders))&amp;lt;4"},&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;OrderDate={'&amp;gt;=$(MonthStart(Max(OrderDate),-2)))&amp;lt;=$(=Date(Max(OrderDate)))'}&amp;gt;}Orders)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 09:39:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204116#M387187</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2016-11-02T09:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204117#M387188</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;Try this expresion : sum({&amp;lt;country={"=rank(aggr(Sum(Orders), country), 4, 1)&amp;lt;=3"}&amp;gt;} Orders)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aurélien&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 10:39:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204117#M387188</guid>
      <dc:creator>Aurelien_Martinez</dc:creator>
      <dc:date>2016-11-02T10:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204118#M387189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I fix the expression as I suggested, I get the results you requested. The only difference I see is they aren't sorted in the order you show. If that's important to you, sort your second dimension like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;rank(sum({&amp;lt;MonthYear={"$(=max(MonthYear))"}&amp;gt;} Orders),4,1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you can also just use this as your expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum(Orders)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 18:05:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204118#M387189</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-11-02T18:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204119#M387190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John&lt;/P&gt;&lt;P&gt;When i select the march month, the data is displaying wrong and for the remining months as well.&lt;/P&gt;&lt;P&gt;In march month top 3 are&lt;/P&gt;&lt;P&gt;India, japan and korea&lt;/P&gt;&lt;P&gt;but these values are displaying wrong in the comparision chart&lt;/P&gt;&lt;P&gt;when these values are compared to the previous month, the values are also wrong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you please help me&lt;/P&gt;&lt;P&gt;i have the as of calender, where i can show the current month data with currentmonth =1 flag&lt;/P&gt;&lt;P&gt;i can able to show the previous 5 months as well with isprevious5 =1 flag ( which you sorted out) in the bel;ow thread&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/1141765"&gt;Current month average comparision with previous months average&lt;/A&gt;&lt;/P&gt;&lt;P&gt;but when there are only 2 top&amp;nbsp; values in the current month the problem is araising&lt;/P&gt;&lt;P&gt;top 2 values in the current month are displaying as well as other values from other months are also displaying&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="142836" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/142836_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2016 16:06:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204119#M387190</guid>
      <dc:creator />
      <dc:date>2016-11-03T16:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204120#M387191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp; Aurelien,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i select the march month, the data is displaying wrong and for the remining months as well.&lt;/P&gt;&lt;P&gt;In march month top 3 are&lt;/P&gt;&lt;P&gt;India, japan and korea&lt;/P&gt;&lt;P&gt;but these values are displaying wrong in the comparision chart&lt;/P&gt;&lt;P&gt;when these values are compared to the previous month, the values are also wrong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the top 3 in march should display in previous months as well if there is no data for those countries in previous month show it as null or no bar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;top 3 values in the current month are displaying wrong&amp;nbsp; as well as other values from other months are also displaying&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/servlet/JiveServlet/showImage/2-1153840-142836/pastedImage_0.png"&gt;&lt;IMG class="jive-image image-1" height="420" src="https://community.qlik.com/legacyfs/online/142837_pastedImage_0.png" width="552" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2016 16:20:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204120#M387191</guid>
      <dc:creator />
      <dc:date>2016-11-03T16:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204121#M387192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tesesco&lt;/P&gt;&lt;P&gt;When i select the march month, the data is displaying wrong and for the remining months as well.&lt;/P&gt;&lt;P&gt;In march month top 3 are&lt;/P&gt;&lt;P&gt;India, japan and korea&lt;/P&gt;&lt;P&gt;but these values are displaying wrong in the comparision chart&lt;/P&gt;&lt;P&gt;when these values are compared to the previous month, the values are also wrong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the top 3 in march should display in previous months as well if there is no data for those countries in previous month show it as null or no bar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;top 3 values in the current month are displaying wrong&amp;nbsp; as well as other values from other months are also displaying&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/legacyfs/online/142853_pastedImage_0.png"&gt;&lt;IMG class="jive-image image-1" height="420" src="https://community.qlik.com/legacyfs/online/142853_pastedImage_0.png" width="552" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2016 16:36:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204121#M387192</guid>
      <dc:creator />
      <dc:date>2016-11-03T16:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204122#M387193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this what you want for March? I guess you said the 300 is wrong, but I'm unclear why it's wrong. It seems right to me.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="142864" alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/142864_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;To get this chart, I changed the second dimension to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;=aggr(if(rank(sum({&amp;lt;MonthYear={"$(=max(MonthYear))"}&amp;gt;} Orders),4,1)&amp;lt;=3,country),country)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2016 20:00:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204122#M387193</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-11-03T20:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204123#M387194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;The requiremnt is,&amp;nbsp; what ever the month user selects&lt;/P&gt;&lt;P&gt;The top3 in that month should be shown&lt;/P&gt;&lt;P&gt;and want&amp;nbsp; to see how these top 3 in selcted month are in previous 3 months&lt;/P&gt;&lt;P&gt;for march and feb, it is showing correct results &lt;/P&gt;&lt;P&gt;where as when i select april its again not showing correct results&lt;/P&gt;&lt;P&gt;there is only one value in april ie usa&lt;/P&gt;&lt;P&gt;but in the previous months there is no data for usa so there should be no data shown&lt;/P&gt;&lt;P&gt;but the bar is showing other countries data as well&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/142974_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Nov 2016 17:17:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204123#M387194</guid>
      <dc:creator />
      <dc:date>2016-11-04T17:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204124#M387195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;The above expression is working fine for me in all cases expect the below case&lt;/P&gt;&lt;P&gt;if there is only one value in current month, the previous months should also show one value (ie the value which is in current month) else it should not show but with the above expression, the previous months top values are also displaying along with the current values.&lt;/P&gt;&lt;P&gt;in the below chart&lt;/P&gt;&lt;P&gt;i have only 1 order in may and that order is showing in the previous 3 months but along with that the other values are also showing which shouldn't&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/142995_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Nov 2016 18:20:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204124#M387195</guid>
      <dc:creator />
      <dc:date>2016-11-04T18:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204125#M387196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I recoded/simplified your Calendar and AsOf script from scratch so that everything was defined and connected more like I'm used to. The chart seems to be working correctly now for all months, if I understand how it's supposed to work. Sorry for all this confusion. You asked for something that seems like it should be so easy, and it's turned out to be so difficult to get right. I sure hope we have it this time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Dimension 1 = Month&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Dimension 2 = Country&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Expression&amp;nbsp; = sum({&amp;lt;Country={"=rank(sum({&amp;lt;IsCurrent={1}&amp;gt;} Orders),4,1)&amp;lt;4"}&amp;gt;} Orders)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/142984_Capture.PNG" style="height: auto;" /&gt;&lt;IMG alt="Capture2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/143003_Capture2.PNG" style="height: auto;" /&gt;&lt;IMG alt="Capture3.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/143004_Capture3.PNG" style="height: auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Nov 2016 19:35:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204125#M387196</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-11-04T19:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204126#M387197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John&lt;/P&gt;&lt;P&gt;You are absolute genious, great&amp;nbsp; and the qlik guru, thanks a ton, that solved the problem.&lt;/P&gt;&lt;P&gt;One last thing&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-family: Courier New;"&gt;= sum({&amp;lt;Country={"=rank(sum({&amp;lt;IsCurrent={1}&amp;gt;} Orders),4,1)&amp;lt;4"}&amp;gt;} Orders)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New;"&gt;this gives me the exact results &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New;"&gt;but i want to always see the last 3 months data when ever i selecta month&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New;"&gt;ie the isrolling3 flag should be always 1, where can i insert the isrolling3 flag into this setexpression&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Nov 2016 09:16:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204126#M387197</guid>
      <dc:creator />
      <dc:date>2016-11-05T09:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204127#M387198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like this:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum({&amp;lt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;IsRolling3={1},&lt;/STRONG&gt;&lt;/SPAN&gt;Country={"=rank(sum({&amp;lt;IsCurrent={1}&amp;gt;} Orders),4,1)&amp;lt;4"}&amp;gt;} Orders)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2016 17:19:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204127#M387198</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-11-07T17:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: top n values in current month comparing to previous month</title>
      <link>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204128#M387199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.... Thank you.... Thank you.... Thank you ..... its working perfect&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please xplain me the logic please&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2016 18:57:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/top-n-values-in-current-month-comparing-to-previous-month/m-p/1204128#M387199</guid>
      <dc:creator />
      <dc:date>2016-11-07T18:57:52Z</dc:date>
    </item>
  </channel>
</rss>

