<?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: How to load the table for the last 3 days? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-load-the-table-for-the-last-3-days/m-p/1235620#M855835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jasmal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A possible solution would be:&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;DATES1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD DISTINCT date AS date1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM Sample_Data.xlsx (ooxml, embedded labels, table is Sheet1);&lt;/SPAN&gt;&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;DATES2:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD date1 AS date2&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;RESIDENT DATES1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ORDER BY date1 DESC;&lt;/SPAN&gt;&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;LET vsLasDate3 = Peek('date2', 2, 'DATES2');&lt;/SPAN&gt;&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;DATES:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD date,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; value&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM Sample_Data.xlsx (ooxml, embedded labels, table is Sheet1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;WHERE date &amp;gt;= '$(vsLasDate3)';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attach the sample; hope it serves...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;H&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Feb 2017 11:45:50 GMT</pubDate>
    <dc:creator>hector_munoz</dc:creator>
    <dc:date>2017-02-08T11:45:50Z</dc:date>
    <item>
      <title>How to load the table for the last 3 days?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-the-table-for-the-last-3-days/m-p/1235619#M855834</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;&lt;/P&gt;&lt;P&gt;I have a requirement to load a table with the last 3 dates available in the same. How can i restrict the table by using the where clause.&lt;/P&gt;&lt;P&gt;Attaching a sample qvw and data for better understanding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My intention is to use something like this.&lt;/P&gt;&lt;P&gt;LOAD date, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[Sample_Data.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;where date&amp;gt;max(date)-4;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but here max function is not working. also i don't want to use the date explicitly in the script(&lt;SPAN style="font-size: 13.3333px;"&gt;date&amp;gt;1/28/2015&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&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/How-to-load-the-table-for-the-last-3-days/m-p/1235619#M855834</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to load the table for the last 3 days?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-the-table-for-the-last-3-days/m-p/1235620#M855835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jasmal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A possible solution would be:&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;DATES1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD DISTINCT date AS date1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM Sample_Data.xlsx (ooxml, embedded labels, table is Sheet1);&lt;/SPAN&gt;&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;DATES2:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD date1 AS date2&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;RESIDENT DATES1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ORDER BY date1 DESC;&lt;/SPAN&gt;&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;LET vsLasDate3 = Peek('date2', 2, 'DATES2');&lt;/SPAN&gt;&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;DATES:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD date,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; value&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM Sample_Data.xlsx (ooxml, embedded labels, table is Sheet1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;WHERE date &amp;gt;= '$(vsLasDate3)';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attach the sample; hope it serves...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;H&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2017 11:45:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-the-table-for-the-last-3-days/m-p/1235620#M855835</guid>
      <dc:creator>hector_munoz</dc:creator>
      <dc:date>2017-02-08T11:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to load the table for the last 3 days?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-the-table-for-the-last-3-days/m-p/1235621#M855836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another way&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD date, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Sample_Data.xlsx]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Join (Table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Max(date) - 3 as MaxDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FinalTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Where Flag = 1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; value,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(date &amp;gt; MaxDate, 1, 0) as Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2017 12:03:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-the-table-for-the-last-3-days/m-p/1235621#M855836</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-02-08T12:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to load the table for the last 3 days?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-the-table-for-the-last-3-days/m-p/1235622#M855837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hector. Thanks for your quick response. I think you are taking only the distinct values of the dates. but i need to have all the values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2017 12:27:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-the-table-for-the-last-3-days/m-p/1235622#M855837</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-08T12:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to load the table for the last 3 days?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-the-table-for-the-last-3-days/m-p/1235623#M855838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2017 12:27:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-the-table-for-the-last-3-days/m-p/1235623#M855838</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-08T12:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to load the table for the last 3 days?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-the-table-for-the-last-3-days/m-p/1235624#M855839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or Just this &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;temp:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;Date(MinDate + IterNo()) AS date&lt;/P&gt;&lt;P&gt;WHILE MinDate + IterNo() &amp;lt;= MaxDate;&lt;/P&gt;&lt;P&gt;LOAD Max(date)-3 as MinDate,&lt;/P&gt;&lt;P&gt;Max(date) as MaxDate&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left Keep&lt;/P&gt;&lt;P&gt;FACT:&lt;/P&gt;&lt;P&gt;LOAD date, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table temp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2017 12:29:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-the-table-for-the-last-3-days/m-p/1235624#M855839</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-02-08T12:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to load the table for the last 3 days?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-the-table-for-the-last-3-days/m-p/1235625#M855840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the date field is not continuous , you should rather use Ranking like:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Join (Table)&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //LOAD Max(date) - 3 as MaxDate&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;LOAD Max(date,3) as MaxDate&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Resident Table;&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FinalTable:&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD date,&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; value&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Where Flag = 1;&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD date,&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; value,&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; // If(date &amp;gt; MaxDate, 1, 0) as Flag&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;If(date &amp;gt;= MaxDate, 1, 0) as Flag&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Resident Table;&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>Wed, 08 Feb 2017 12:38:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-the-table-for-the-last-3-days/m-p/1235625#M855840</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2017-02-08T12:38:00Z</dc:date>
    </item>
  </channel>
</rss>

