<?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: Fetching rolling N months of data - how to tackle new year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Fetching-rolling-N-months-of-data-how-to-tackle-new-year/m-p/593317#M685214</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By using a date field:&lt;/P&gt;&lt;P&gt;where &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;DateInterpret&lt;/SPAN&gt;&amp;gt;= monthstart(today(), -6) and &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;DateInterpret&lt;/SPAN&gt;&amp;lt; monthstart(today())&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Jan 2014 12:45:57 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2014-01-31T12:45:57Z</dc:date>
    <item>
      <title>Fetching rolling N months of data - how to tackle new year</title>
      <link>https://community.qlik.com/t5/QlikView/Fetching-rolling-N-months-of-data-how-to-tackle-new-year/m-p/593314#M685209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with fetching data of some rolling months.&lt;/P&gt;&lt;P&gt;As soon as the new year started, the formula I wrote is not returning any data (understandably)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13911639779743389" jivemacro_uid="_13911639779743389" modifiedtitle="true"&gt;
&lt;P&gt;RESIDENT Stock&lt;/P&gt;
&lt;P&gt;WHERE Month(DateInterpret)&amp;gt;=(Month(today())-6) AND Month(DateInterpret)&amp;lt;=(Month(today())-1)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the best common practice in QV to load data for &lt;EM&gt;N&lt;/EM&gt; rolling months?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 10:28:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fetching-rolling-N-months-of-data-how-to-tackle-new-year/m-p/593314#M685209</guid>
      <dc:creator />
      <dc:date>2014-01-31T10:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching rolling N months of data - how to tackle new year</title>
      <link>https://community.qlik.com/t5/QlikView/Fetching-rolling-N-months-of-data-how-to-tackle-new-year/m-p/593315#M685211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybo not a best practice per se but you can create with autonumber a rolling YearMonth ID.&lt;/P&gt;&lt;P&gt;Use autonumber on the yearmonth object from your master calendar, or create this with the combination of year(date)&amp;amp;month(date). This will generate a sequential number starting with 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this autonumber instead of &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;Month(today()&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 10:42:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fetching-rolling-N-months-of-data-how-to-tackle-new-year/m-p/593315#M685211</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2014-01-31T10:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching rolling N months of data - how to tackle new year</title>
      <link>https://community.qlik.com/t5/QlikView/Fetching-rolling-N-months-of-data-how-to-tackle-new-year/m-p/593316#M685212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you could try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE ((Year(DateInterpret) * 12) + Month(DateInterpret))&amp;gt;= ((Year(today) * 12) + Month(today())-6) &lt;/P&gt;&lt;P&gt;AND ((Year(DateInterpret) * 12) + Month(DateInterpret))&amp;lt;=((Year(today()) * 12) + Month(today())-1) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 10:49:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fetching-rolling-N-months-of-data-how-to-tackle-new-year/m-p/593316#M685212</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2014-01-31T10:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching rolling N months of data - how to tackle new year</title>
      <link>https://community.qlik.com/t5/QlikView/Fetching-rolling-N-months-of-data-how-to-tackle-new-year/m-p/593317#M685214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By using a date field:&lt;/P&gt;&lt;P&gt;where &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;DateInterpret&lt;/SPAN&gt;&amp;gt;= monthstart(today(), -6) and &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;DateInterpret&lt;/SPAN&gt;&amp;lt; monthstart(today())&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 12:45:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fetching-rolling-N-months-of-data-how-to-tackle-new-year/m-p/593317#M685214</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-01-31T12:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching rolling N months of data - how to tackle new year</title>
      <link>https://community.qlik.com/t5/QlikView/Fetching-rolling-N-months-of-data-how-to-tackle-new-year/m-p/593318#M685216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you guys, I have to say that both Gysbert's and Marcus' answers are working, just Gysbert's solution looks more proper.&lt;/P&gt;&lt;P&gt;I am not sure how I could have used autonumber in my situation, but still thanks for the input Michiel!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 15:31:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fetching-rolling-N-months-of-data-how-to-tackle-new-year/m-p/593318#M685216</guid>
      <dc:creator />
      <dc:date>2014-01-31T15:31:40Z</dc:date>
    </item>
  </channel>
</rss>

