<?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: Load only specific dates from QVDs in Qlik Automate</title>
    <link>https://community.qlik.com/t5/Qlik-Automate/Load-only-specific-dates-from-QVDs/m-p/2481271#M4739</link>
    <description>&lt;P&gt;In your load statement, add a new field:&lt;/P&gt;
&lt;P&gt;Date#(Subfield(Subfield(Filebasename(), '_', -1), '.', 1), 'YYYY-MM-DD') as Date&lt;/P&gt;</description>
    <pubDate>Thu, 12 Sep 2024 10:18:03 GMT</pubDate>
    <dc:creator>madelonjansen</dc:creator>
    <dc:date>2024-09-12T10:18:03Z</dc:date>
    <item>
      <title>Load only specific dates from QVDs</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Load-only-specific-dates-from-QVDs/m-p/2481269#M4738</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I have a folder containing daily snapshots of data. The format of the name is the following:&lt;BR /&gt;&lt;BR /&gt;DAT_2024-09-12.qvd&lt;BR /&gt;&lt;BR /&gt;I currently have 3 months of data in there and what I want to do is to load all dates available for the current month and only Mondays for the previous months.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Any help with the scripting part is highly appreciated!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 10:10:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Load-only-specific-dates-from-QVDs/m-p/2481269#M4738</guid>
      <dc:creator>SilviyaK</dc:creator>
      <dc:date>2024-09-12T10:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Load only specific dates from QVDs</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Load-only-specific-dates-from-QVDs/m-p/2481271#M4739</link>
      <description>&lt;P&gt;In your load statement, add a new field:&lt;/P&gt;
&lt;P&gt;Date#(Subfield(Subfield(Filebasename(), '_', -1), '.', 1), 'YYYY-MM-DD') as Date&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 10:18:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Load-only-specific-dates-from-QVDs/m-p/2481271#M4739</guid>
      <dc:creator>madelonjansen</dc:creator>
      <dc:date>2024-09-12T10:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Load only specific dates from QVDs</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Load-only-specific-dates-from-QVDs/m-p/2481285#M4740</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/197749"&gt;@SilviyaK&lt;/a&gt;&amp;nbsp; try below&lt;/P&gt;
&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;AllFiles:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="book antiqua,palatino"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;first 1&lt;/STRONG&gt;&lt;/FONT&gt; LOAD date(Date#(SubField(FileBaseName(),'_',2),'YYYY-MM-DD')) as Date,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="book antiqua,palatino"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FileBaseName() as FileName&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="book antiqua,palatino"&gt;FROM [lib://Folder/Qvd/&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;DAT_*&lt;/FONT&gt;&lt;/STRONG&gt;.qvd]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="book antiqua,palatino"&gt;(qvd);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;let vCurrentMonthStart = floor(MonthStart(Today()));&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="book antiqua,palatino"&gt;let vCurrentMonthEnd = floor(monthend(Today()));&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="book antiqua,palatino"&gt;let vPreviousMonthStart = floor(monthstart(addmonths(Today(),-1)));&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="book antiqua,palatino"&gt;let vPreviousMonthEnd = Floor(monthend(addmonths(Today(),-1)));&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;RequiredFiles:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="book antiqua,palatino"&gt;Load FileName &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="book antiqua,palatino"&gt;Resident AllFiles&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="book antiqua,palatino"&gt;where Date &amp;gt;= $(vPreviousMonthStart) and Date &amp;lt;= $(vPreviousMonthEnd) and WeekDay(Date)='Mon';&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;Load FileName &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="book antiqua,palatino"&gt;Resident AllFiles&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="book antiqua,palatino"&gt;where Date &amp;gt;= $(vCurrentMonthStart) and Date &amp;lt;= $(vCurrentMonthEnd);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;Drop Table AllFiles;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;Data:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="book antiqua,palatino"&gt;Load 0 as temp&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="book antiqua,palatino"&gt;AutoGenerate 0;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;for i=1 to FieldValueCount('FileName')&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;let vFileName = FieldValue('FileName',$(i));&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;Concatenate(Data)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="book antiqua,palatino"&gt;Load *,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="book antiqua,palatino"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FileBaseName() as FileName&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="book antiqua,palatino"&gt;FROM [llib://Folder/Qvd/&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;$(vFileName)&lt;/STRONG&gt;&lt;/FONT&gt;.qvd]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="book antiqua,palatino"&gt;(qvd);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;Next&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;Drop Table RequiredFiles;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="book antiqua,palatino"&gt;Drop Field temp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 11:57:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Load-only-specific-dates-from-QVDs/m-p/2481285#M4740</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2024-09-12T11:57:54Z</dc:date>
    </item>
  </channel>
</rss>

