<?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 function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-function/m-p/894341#M657828</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Isn't that a bit dangrous? I mean, if you load only the latest reports in different tables, and some reports may not exist on that date, then certain tables won't be created and this may cause problems further in your script or in the UI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or are you CONCATENATing all good csv files in a single large resident table? In that case you could use something like this instead of the last LOAD in your script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;FOR each vInputTable IN '$(&lt;SPAN style="color: #3d3d3d;"&gt;vDTCCFX'', '$(&lt;SPAN style="color: #3d3d3d;"&gt;vDTCCRATES),&lt;SPAN style="color: #3d3d3d;"&gt; ... // Add the others&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; IF Not IsNull(FileTime('&lt;SPAN style="color: #3d3d3d;"&gt;$(vPath)$(vDatum)$(vInputTable).csv&lt;/SPAN&gt;')) THEN&amp;nbsp; // file exists&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BigTable:&amp;nbsp; // Replace with &lt;EM&gt;[$(vInputTable)]:&lt;/EM&gt; if you want separate tables&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD * FROM [&lt;SPAN style="color: #3d3d3d;"&gt;$(vPath)$(vDatum)$(vInputTable).csv] (&lt;EM&gt;options&lt;/EM&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; END IF&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;NEXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Jun 2015 10:12:41 GMT</pubDate>
    <dc:creator>Peter_Cammaert</dc:creator>
    <dc:date>2015-06-04T10:12:41Z</dc:date>
    <item>
      <title>Load function</title>
      <link>https://community.qlik.com/t5/QlikView/Load-function/m-p/894337#M657824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Qlikview community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question regarding the load function. What I would like to do is to load the most recent report in my script. I load multiple reports to create a dashboard that displays trade position reporting and feedback from the reports. Most reports are downloaded from the same portal. However, the portal is not always up to date. The reports are saved on the same location daily using the name of the report and the date of the report. This means I can use the date in the file name to load the most recent report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from (location)/namereport-&lt;STRONG&gt;mostrecentdate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I figured there should be a way to script something like this. Besides this, I would like all reports to have the same reporting date. It is possible that some reports can be from yesterday, while others are older. In that case I would like all load statements to load the most recent reporting date for which all reports are availabe, which is probably harder to do. Can anyone provide code for this or steer me into the right direction?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 08:52:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-function/m-p/894337#M657824</guid>
      <dc:creator />
      <dc:date>2015-06-02T08:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Load function</title>
      <link>https://community.qlik.com/t5/QlikView/Load-function/m-p/894338#M657825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can find an answer in this post: &lt;A href="https://community.qlik.com/message/656456"&gt;Re: Re: Oldest Excel file LOADING&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 09:21:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-function/m-p/894338#M657825</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-06-02T09:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Load function</title>
      <link>https://community.qlik.com/t5/QlikView/Load-function/m-p/894339#M657826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might like to also see this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET v_path = '&amp;lt;servername&amp;gt;\QVD\';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//the read of qvd's&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For Each ext in 'qvd','QVD'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; For Each file&amp;nbsp; in FileList(path&amp;amp;'*.'&amp;amp;ext) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; COLLECTION_QVD:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; '$(file)' as FilePath,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; FileTime('$(file)') as DateModify,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Date(FileTime('$(file)')) as Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; autogenerate 1; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; NEXT file&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NEXT ext&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;STORE [COLLECTION_QVD] into [COLLECTION_QVD.qvd] (qvd);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table COLLECTION_QVD;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;COLLECTION_QVD:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD FilePath, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DateFile&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;COLLECTION_QVD.qvd (qvd)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;where &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date&amp;nbsp; &amp;gt;= MakeDate(Year(Now()-2),Month(Now()-2),Day(Now()-2)); //Clause of their choice.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/*&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; ...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; Space load for their logic most recente date...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; ...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;*/&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 16:58:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-function/m-p/894339#M657826</guid>
      <dc:creator>jonas_rezende</dc:creator>
      <dc:date>2015-06-02T16:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Load function</title>
      <link>https://community.qlik.com/t5/QlikView/Load-function/m-p/894340#M657827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your help. I have a better understanding of how I can load the latest file of a list, which I actually managed to do. I did the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set NullInterpret = '';&lt;/P&gt;&lt;P&gt;SET ThousandSep='.';&lt;/P&gt;&lt;P&gt;SET DecimalSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='€ #.##0,00;€ -#.##0,00';&lt;/P&gt;&lt;P&gt;SET TimeFormat='h:mm:ss';&lt;/P&gt;&lt;P&gt;SET DateFormat='MM-DD-YYYY';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='D-M-YYYY h:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;SET MonthNames='jan;feb;mrt;apr;mei;jun;jul;aug;sep;okt;nov;dec';&lt;/P&gt;&lt;P&gt;SET DayNames='ma;di;wo;do;vr;za;zo';&lt;/P&gt;&lt;P&gt;LET vPath = 'C:\Users\yno\Documents\Qlikview-Dashboard\';&lt;/P&gt;&lt;P&gt;LET vToday = date(today(),'DDMMYYYY');&lt;/P&gt;&lt;P&gt;LET vPositions = 'OTC-Posities';&lt;/P&gt;&lt;P&gt;LET vDTCCFX = 'DTCCFX';&lt;/P&gt;&lt;P&gt;LET vDTCCRATES = 'DTCCRATES';&lt;/P&gt;&lt;P&gt;LET vDTCCCOMMODITIES = 'DTCCCOMMODITIES';&lt;/P&gt;&lt;P&gt;LET vDTCCCREDIT='DTCCCREDIT';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;datagathering:&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;load date(filetime(),'DDMMYYYY') as Filetimestamp,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FileName() as Filename,&lt;/P&gt;&lt;P&gt;date(Mid(Filename(),findoneof(Filename(),'-')+1,10),'MM-DD-YYYY') as datum //this is the position of the date in the filename of the reports&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;from $(vPath)*.csv;&lt;/SPAN&gt;&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;load *&lt;/SPAN&gt;&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;resident datagathering&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;order by datum;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;load date(max(datum),'DDMMYYYY') as maximaal&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;resident datagathering;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;LET vDatum=fieldvalue('maximaal',1);&lt;/SPAN&gt;&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;load *&lt;/SPAN&gt;&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;from $(vPath)$(vDatum)$(vDTCCFX).csv;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This allows me to load the latest file of each report. &lt;STRONG&gt;However, &lt;/STRONG&gt;a problem arises when not all reports have the same date, this can actually happen, because I have noticed that sometimes certain reports aren't updated daily where others are. Since it is vital that all reports are from the same reporting date, I would like to use code to actually get the most recent date &lt;STRONG&gt;for which all reports for that date exist on the server. &lt;/STRONG&gt;Do you have any suggestions for realizing this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2015 09:59:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-function/m-p/894340#M657827</guid>
      <dc:creator />
      <dc:date>2015-06-04T09:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Load function</title>
      <link>https://community.qlik.com/t5/QlikView/Load-function/m-p/894341#M657828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Isn't that a bit dangrous? I mean, if you load only the latest reports in different tables, and some reports may not exist on that date, then certain tables won't be created and this may cause problems further in your script or in the UI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or are you CONCATENATing all good csv files in a single large resident table? In that case you could use something like this instead of the last LOAD in your script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;FOR each vInputTable IN '$(&lt;SPAN style="color: #3d3d3d;"&gt;vDTCCFX'', '$(&lt;SPAN style="color: #3d3d3d;"&gt;vDTCCRATES),&lt;SPAN style="color: #3d3d3d;"&gt; ... // Add the others&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; IF Not IsNull(FileTime('&lt;SPAN style="color: #3d3d3d;"&gt;$(vPath)$(vDatum)$(vInputTable).csv&lt;/SPAN&gt;')) THEN&amp;nbsp; // file exists&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BigTable:&amp;nbsp; // Replace with &lt;EM&gt;[$(vInputTable)]:&lt;/EM&gt; if you want separate tables&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD * FROM [&lt;SPAN style="color: #3d3d3d;"&gt;$(vPath)$(vDatum)$(vInputTable).csv] (&lt;EM&gt;options&lt;/EM&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; END IF&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;NEXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2015 10:12:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-function/m-p/894341#M657828</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-06-04T10:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Load function</title>
      <link>https://community.qlik.com/t5/QlikView/Load-function/m-p/894342#M657829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The important is define which is period most recent. After, create one work logic with this time, and use in where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, think of the idea of how to treat non existent report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 13:44:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-function/m-p/894342#M657829</guid>
      <dc:creator>jonas_rezende</dc:creator>
      <dc:date>2015-06-05T13:44:54Z</dc:date>
    </item>
  </channel>
</rss>

