<?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: rolling 3 months not working properly with set analysis...? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/rolling-3-months-not-working-properly-with-set-analysis/m-p/1028203#M936024</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think doing this AutoNumber() or RowNo() might be easy if we have a MasterCalendar. But without a MasterCalendar I like this new technique that I just learnt from you &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Feb 2016 16:05:40 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-02-25T16:05:40Z</dc:date>
    <item>
      <title>rolling 3 months not working properly with set analysis...?</title>
      <link>https://community.qlik.com/t5/QlikView/rolling-3-months-not-working-properly-with-set-analysis/m-p/1028198#M936019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;am attaching the sample data , which is having a date field from that am extracting the month field.&lt;/P&gt;&lt;P&gt;and using the same month as dimension and exp as :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Exp :&amp;nbsp;&amp;nbsp; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;only&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ({&amp;lt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MONTH&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'&amp;gt;= $(=Max(MONTH)-2) &amp;lt;=$(=Max(MONTH))'} &amp;gt; } &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Final_Result&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have the data for 3 years from 2013 to 2015 but the load order into Qlikview will be different. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Rolling 3 months not working fine when I select Jan ,Feb , Nov and dec of every year.. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;for the remaining month selections it is working fine...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;please let me know your suggestions or best methods to achieve this..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Attaching the sample please have a look into that...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Vishal.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2016 13:59:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rolling-3-months-not-working-properly-with-set-analysis/m-p/1028198#M936019</guid>
      <dc:creator>vishalgoud</dc:creator>
      <dc:date>2016-02-25T13:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: rolling 3 months not working properly with set analysis...?</title>
      <link>https://community.qlik.com/t5/QlikView/rolling-3-months-not-working-properly-with-set-analysis/m-p/1028199#M936020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what you trying to do, but may be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;MonthNum = {$(=If(Max(MonthNum) &amp;gt; 2, Chr(39) &amp;amp; '&amp;gt;=' &amp;amp; (Max(MonthNum) - 2) &amp;amp; '&amp;lt;=' &amp;amp; Max(MonthNum) &amp;amp; Chr(39), If(Max(MonthNum) = 1, '1, 11, 12', '1, 2, 12')))}, Month&amp;gt;} Final_Result)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2016 14:36:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rolling-3-months-not-working-properly-with-set-analysis/m-p/1028199#M936020</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-02-25T14:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: rolling 3 months not working properly with set analysis...?</title>
      <link>https://community.qlik.com/t5/QlikView/rolling-3-months-not-working-properly-with-set-analysis/m-p/1028200#M936021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This formula might be working, but it's a very wasteful calculation. What's the point in using Set Analysis if you have two nested IF statements in it? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The original calculation with Month can't work for two reasons:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. In order to subtract 2 months, you need a field that goes across years, to avoid the need in several IF conditions. You need to prepare a field like MonthSerialNumber, where you assign a serial number to every month in your data, in a way that January 2016 is equal to December 2015 + 1. The simplest way of calculating that is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Year(Date) * 12 + Month(Date) as MonthSerialNumber&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The traditional Month field is a dual field - it holds both the number and the text. You'd have to provide the text in order to make such a comparison in Set Analysis. The function MAX(), however, is a numeric number and returns a number, not a text. For this reasons, Month filters can only be used with Advanced Search filters. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Month = {"=num(Month)&amp;gt;=MAX(Month)-1"} &lt;/P&gt;&lt;P&gt;, still with the limitation of the year-end boundaries that I explained in #1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this problem goes away if you calculate and use MonthSerialNumber, because this field is numeric, not dual. So, the final Set Analysis filter can be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;MonthSerialNumber = {"&amp;gt;=MAX(&lt;SPAN style="font-size: 13.3333px;"&gt;MonthSerialNumber)-2&amp;lt;=Max(&lt;SPAN style="font-size: 13.3333px;"&gt;MonthSerialNumber&lt;/SPAN&gt;)&lt;/SPAN&gt;"}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;You can learn everything I just explained, and many other QlikView development techniques, from my new book &lt;A href="http://www.amazon.com/gp/product/1118949552/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1118949552&amp;amp;linkCode=as2&amp;amp;tag=natursyner0f-20&amp;amp;linkId=IN55M5EPRHLRBWIQ"&gt;QlikView Your Business&lt;/A&gt;. You can also upgrade your Qlik skills at the &lt;A href="http://masterssummit.com/"&gt;Masters Summit for Qlik&lt;/A&gt;, the most advanced technical conference for QlikView and Qlik Sense.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Oleg Troyansky&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2016 14:51:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rolling-3-months-not-working-properly-with-set-analysis/m-p/1028200#M936021</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2016-02-25T14:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: rolling 3 months not working properly with set analysis...?</title>
      <link>https://community.qlik.com/t5/QlikView/rolling-3-months-not-working-properly-with-set-analysis/m-p/1028201#M936022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I like the calculation for &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MonthSerialNumber. I often think of doing RowNo(), but that would need sorting. But this wouldn't have that problem -&amp;gt; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Year(Date) * 12 + Month(Date)&lt;/STRONG&gt;&lt;/SPAN&gt;. Will keep this in mind for later &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2016 14:54:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rolling-3-months-not-working-properly-with-set-analysis/m-p/1028201#M936022</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-02-25T14:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: rolling 3 months not working properly with set analysis...?</title>
      <link>https://community.qlik.com/t5/QlikView/rolling-3-months-not-working-properly-with-set-analysis/m-p/1028202#M936023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also recall seeing an ingenious calculation like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AutoNumber(MonthYear) as MonthSerialNumber&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which also requires sorting, but is very sleek, indeed. I think Stefan suggested it once...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2016 15:32:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rolling-3-months-not-working-properly-with-set-analysis/m-p/1028202#M936023</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2016-02-25T15:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: rolling 3 months not working properly with set analysis...?</title>
      <link>https://community.qlik.com/t5/QlikView/rolling-3-months-not-working-properly-with-set-analysis/m-p/1028203#M936024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think doing this AutoNumber() or RowNo() might be easy if we have a MasterCalendar. But without a MasterCalendar I like this new technique that I just learnt from you &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2016 16:05:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rolling-3-months-not-working-properly-with-set-analysis/m-p/1028203#M936024</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-02-25T16:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: rolling 3 months not working properly with set analysis...?</title>
      <link>https://community.qlik.com/t5/QlikView/rolling-3-months-not-working-properly-with-set-analysis/m-p/1028204#M936025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oleg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all Thanks a lot for the Best approach , But my bad am unable to get the required one for my situation.&lt;/P&gt;&lt;P&gt;Can you please work on the sample data Provided and share the Qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the attachment in the main post..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2016 18:51:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rolling-3-months-not-working-properly-with-set-analysis/m-p/1028204#M936025</guid>
      <dc:creator>vishalgoud</dc:creator>
      <dc:date>2016-02-25T18:51:49Z</dc:date>
    </item>
  </channel>
</rss>

