<?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 How to load two files of difference dates under one source file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-load-two-files-of-difference-dates-under-one-source-file/m-p/1257023#M623638</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;Before my question, here are my situation.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I am working on an extract script to load daily reports from a server folder.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The logic of loading is to load the latest file until system close date&lt;/P&gt;&lt;P&gt;I have two reports to load: Report A has only one system close date, Report B has two system close dates, Phase 1 and Phase 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I named two reports as Source A and Source B and saved them in one master table. 'Year' is year of file dates.&lt;/P&gt;&lt;P&gt;I made a spreadsheet to list each system close date for two sources(reports), then I can use following script to load Source A filed and meet my loading logic.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;But I can not use it to load Source B since it has Phase 1 and Phase 2 dates. How to load two files of different dates under one source file? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Can any Qlikview experts help me on this? Thanks so much for any help in advance!!!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LatestDate:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;load Source&amp;amp;Year as SourceYear,&lt;/P&gt;&lt;P&gt;num(max([File Date])) as MaxDate&lt;/P&gt;&lt;P&gt;Resident&amp;nbsp; &lt;SPAN style="font-size: 10pt;"&gt;$(vTableNameInput)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Group by Source, Year;&lt;/P&gt;&lt;P&gt;left join (&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;LatestDate&lt;/STRONG&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;load Source&amp;amp;Year as SourceYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Phase,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [File Date] as EndDate&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\FileData\Date_Deadlines.xlsx]&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;STRONG&gt;FilterDate&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;load SourceYear&amp;amp;Date(if(MaxDate &amp;gt;EndDate, EndDate, MaxDate),'YYYY-MM-DD') as Filter,&lt;/P&gt;&lt;P&gt;Phase&lt;/P&gt;&lt;P&gt;Resident &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;LatestDate&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;Drop table &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;LatestDate&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Process_Status_Latest:&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;Source&amp;amp;Year&amp;amp;[File Date] as lookup,&lt;/P&gt;&lt;P&gt;Resident $(vTableNameInput)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Where Exists(Filter, Source&amp;amp;Year&amp;amp;[File Date]);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Feb 2017 02:02:57 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-02-13T02:02:57Z</dc:date>
    <item>
      <title>How to load two files of difference dates under one source file</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-two-files-of-difference-dates-under-one-source-file/m-p/1257023#M623638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;Before my question, here are my situation.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I am working on an extract script to load daily reports from a server folder.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The logic of loading is to load the latest file until system close date&lt;/P&gt;&lt;P&gt;I have two reports to load: Report A has only one system close date, Report B has two system close dates, Phase 1 and Phase 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I named two reports as Source A and Source B and saved them in one master table. 'Year' is year of file dates.&lt;/P&gt;&lt;P&gt;I made a spreadsheet to list each system close date for two sources(reports), then I can use following script to load Source A filed and meet my loading logic.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;But I can not use it to load Source B since it has Phase 1 and Phase 2 dates. How to load two files of different dates under one source file? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Can any Qlikview experts help me on this? Thanks so much for any help in advance!!!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LatestDate:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;load Source&amp;amp;Year as SourceYear,&lt;/P&gt;&lt;P&gt;num(max([File Date])) as MaxDate&lt;/P&gt;&lt;P&gt;Resident&amp;nbsp; &lt;SPAN style="font-size: 10pt;"&gt;$(vTableNameInput)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Group by Source, Year;&lt;/P&gt;&lt;P&gt;left join (&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;LatestDate&lt;/STRONG&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;load Source&amp;amp;Year as SourceYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Phase,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [File Date] as EndDate&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\FileData\Date_Deadlines.xlsx]&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;STRONG&gt;FilterDate&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;load SourceYear&amp;amp;Date(if(MaxDate &amp;gt;EndDate, EndDate, MaxDate),'YYYY-MM-DD') as Filter,&lt;/P&gt;&lt;P&gt;Phase&lt;/P&gt;&lt;P&gt;Resident &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;LatestDate&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;Drop table &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;LatestDate&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Process_Status_Latest:&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;Source&amp;amp;Year&amp;amp;[File Date] as lookup,&lt;/P&gt;&lt;P&gt;Resident $(vTableNameInput)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Where Exists(Filter, Source&amp;amp;Year&amp;amp;[File Date]);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2017 02:02:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-two-files-of-difference-dates-under-one-source-file/m-p/1257023#M623638</guid>
      <dc:creator />
      <dc:date>2017-02-13T02:02:57Z</dc:date>
    </item>
  </channel>
</rss>

