<?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: Loading data only for the latest 24 months in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loading-data-only-for-the-latest-24-months/m-p/1189#M792973</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alternatively, If you have full dates you can work like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Load&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Product,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;SalesDate,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;from table1 &lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;STRONG&gt;where SalesDate&amp;gt;Date(addyears(Today(), -2), 'DD.MM.YYYY') and SalesDate&amp;lt;=Date(Today(), 'DD.MM.YYYY');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Jan 2018 01:57:32 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2018-01-16T01:57:32Z</dc:date>
    <item>
      <title>Loading data only for the latest 24 months</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-only-for-the-latest-24-months/m-p/1187#M792971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Hi,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I want to load sales data only for the latest 24 months. I tried to realize it with the script below, but QV always comes up with an error message:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Load&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Product,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;SalesDate,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Sales&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;from table1 &lt;SPAN style="font-size: 10pt;"&gt;where ([SalesDate]&amp;gt;Date(addmonths(max(SalesDate), -23), 'DD.MM.YYYY'));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Any suggestions? I'd appreciate it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks, Ingo&lt;/SPAN&gt;&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/Loading-data-only-for-the-latest-24-months/m-p/1187#M792971</guid>
      <dc:creator>ingoniclas</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data only for the latest 24 months</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-only-for-the-latest-24-months/m-p/1188#M792972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try with a variable, bold in the script below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// test data&lt;/P&gt;&lt;P&gt;&lt;EM&gt;T:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iterno() as&amp;nbsp; Product,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date( makedate(2014) + floor(rand()*365*4)) as SalesDate,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rand()*100 as Sales&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AutoGenerate 1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;While IterNo() &amp;lt;= 10000;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// calc the date from and set the variable&lt;/P&gt;&lt;P&gt;&lt;EM&gt;M:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;load max(SalesDate) as MaxSalesDate Resident T;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;LET vMaxSalesDate = Date( AddMonths(Peek('MaxSalesDate', 0, T), -24));&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table M;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// filter with the variable&lt;/P&gt;&lt;P&gt;&lt;EM&gt;F:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NoConcatenate LOAD &lt;/EM&gt;&lt;EM&gt;*&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident T&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;where SalesDate &amp;gt; '$(vMaxSalesDate)';&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table T;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jan 2018 23:29:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-only-for-the-latest-24-months/m-p/1188#M792972</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2018-01-15T23:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data only for the latest 24 months</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-only-for-the-latest-24-months/m-p/1189#M792973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alternatively, If you have full dates you can work like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Load&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Product,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;SalesDate,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;from table1 &lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;STRONG&gt;where SalesDate&amp;gt;Date(addyears(Today(), -2), 'DD.MM.YYYY') and SalesDate&amp;lt;=Date(Today(), 'DD.MM.YYYY');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 01:57:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-only-for-the-latest-24-months/m-p/1189#M792973</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2018-01-16T01:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data only for the latest 24 months</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-only-for-the-latest-24-months/m-p/1190#M792974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Massimo, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it works! Great! Many thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ingo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 08:56:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-only-for-the-latest-24-months/m-p/1190#M792974</guid>
      <dc:creator>ingoniclas</dc:creator>
      <dc:date>2018-01-16T08:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data only for the latest 24 months</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-only-for-the-latest-24-months/m-p/1191#M792975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unfortunately, using today() is not an option. But t&lt;SPAN style="font-size: 13.3333px;"&gt;hanks for the help.&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;Ingo&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 08:58:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-only-for-the-latest-24-months/m-p/1191#M792975</guid>
      <dc:creator>ingoniclas</dc:creator>
      <dc:date>2018-01-16T08:58:30Z</dc:date>
    </item>
  </channel>
</rss>

