<?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: Incremental Load Based on Variable Date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Incremental-Load-Based-on-Variable-Date/m-p/621759#M684534</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works perfectly.&amp;nbsp; Thank you.&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;For my knowledge bank, why does it need to be set in this manner?&amp;nbsp; What is the difference between the two ways?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Feb 2014 16:21:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-02-07T16:21:18Z</dc:date>
    <item>
      <title>Incremental Load Based on Variable Date</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-Based-on-Variable-Date/m-p/621757#M684532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am attempting to create an incremental load where the data from the file (TestData.csv) is loaded into TestDataQVD.qvd only if the "DATE" is greater than the variable date vMAXDATE (based on the max date of the qvd).&amp;nbsp; Script is below and example case is attached.&amp;nbsp; I've already performed an initial load, so there is one piece of data in the qvd file.&amp;nbsp; The .csv file has two rows of data, one of which should load since the DATE (1/24/2014) is greater than vMAXDATE (1/10/2014).&amp;nbsp; I've tried multiple ways of converting the the "DATE" field to match the variable format without success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Finding the max date value in the QVD&lt;/P&gt;&lt;P&gt;MAX_DATE:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAX(DATE) AS [MAX_DATE]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM TestDataQVD.qvd (qvd)&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Setting the variable value to the "MAX_DATE" field determined in previous step&lt;/P&gt;&lt;P&gt;SET vMAXDATE = MAX_DATE&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Loading data currently in the QVD&lt;/P&gt;&lt;P&gt;TEST_DATA:&lt;/P&gt;&lt;P&gt;LOAD DISTINCT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM TestDataQVD.qvd (qvd)&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Loading the new data from the CSV file, concatenating it to the QVD date&lt;/P&gt;&lt;P&gt;LOAD DISTINCT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID, &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEDCD, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DED_AMT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM TestData.csv (txt, codepage is 1252, embedded labels, delimiter is ',', msq)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Only load where the DATE is greater than the variable vMAXDATE&lt;/P&gt;&lt;P&gt;WHERE DATE &amp;gt; '$(vMAXDATE)'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Storing all of the data (QVD + CSV) in the QVD&lt;/P&gt;&lt;P&gt;STORE TEST_DATA&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;INTO TestDataQVD.qvd (qvd)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;//Reloading the data from the QVD for verification&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM TestDataQVD.qvd (qvd)&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2014 16:03:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-Based-on-Variable-Date/m-p/621757#M684532</guid>
      <dc:creator />
      <dc:date>2014-02-07T16:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Incremental Load Based on Variable Date</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-Based-on-Variable-Date/m-p/621758#M684533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're setting the variable wrong&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;SET vMAXDATE = MAX_DATE&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;should be&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;LET vMAXDATE = PEEK('MAX_DATE',0,'MAX_DATE')&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2014 16:13:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-Based-on-Variable-Date/m-p/621758#M684533</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-02-07T16:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Incremental Load Based on Variable Date</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-Based-on-Variable-Date/m-p/621759#M684534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works perfectly.&amp;nbsp; Thank you.&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;For my knowledge bank, why does it need to be set in this manner?&amp;nbsp; What is the difference between the two ways?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2014 16:21:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-Based-on-Variable-Date/m-p/621759#M684534</guid>
      <dc:creator />
      <dc:date>2014-02-07T16:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Incremental Load Based on Variable Date</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-Based-on-Variable-Date/m-p/621760#M684535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SET here creates variable with the text value 'MAX_DATE'.&lt;/P&gt;&lt;P&gt;LET attempts to calculate the expression, and assigns the result to the variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2014 16:23:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-Based-on-Variable-Date/m-p/621760#M684535</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-07T16:23:52Z</dc:date>
    </item>
  </channel>
</rss>

