<?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 manage with two Loads for one table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793817#M662800</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="script error.png" class="image-1 jive-image" src="/legacyfs/online/76696_script error.png" style="width: 620px; height: 465px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It gives me this error. I dont know why since I creat a table for each loop&amp;nbsp; and then I drop it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Jan 2015 10:16:31 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-01-30T10:16:31Z</dc:date>
    <item>
      <title>How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793809#M662792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am doing a script on Qlikview to extract data from .txt files. I already figure out out to extract the data just fine using two different Loads.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I solve my problem to extract the data by doing two differents:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-one to extract the date on the header of the file; aka Step 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-the other to extract the remaining data. aka Step 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I have a problem because now I want to do a table with both informations. I want one table with the data that I extracted (on step 2) plus the date of the file (step 1), in order to do some reports. In others words, I want my table to have the data from step plus one field with the date which I extract from the file (step 1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I send you my code as well as a random file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you can understand want I mean and you can help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 17:22:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793809#M662792</guid>
      <dc:creator />
      <dc:date>2015-01-29T17:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793810#M662793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you can do is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;First read the date (second load) in a separate table (one line only)&lt;/LI&gt;&lt;LI&gt;Put the date in a variable, say vTableDataDate using the peek function&lt;/LI&gt;&lt;LI&gt;Drop the first table&lt;/LI&gt;&lt;LI&gt;Now read the data, and add the date in variable vTableDataDate as an extra column&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example of the last step:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Data:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD *,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date($(vTableDataDate)) AS TableDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM &lt;SPAN style="font-family: 'courier new', courier;"&gt;.&lt;/SPAN&gt;..&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, 29 Jan 2015 17:29:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793810#M662793</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-01-29T17:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793811#M662794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pedro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like the attached should work for you, hope that helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 17:37:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793811#M662794</guid>
      <dc:creator />
      <dc:date>2015-01-29T17:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793812#M662795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But there will be many files (i just put one as example). Will that work? Dont we need a loops function?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 18:30:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793812#M662795</guid>
      <dc:creator />
      <dc:date>2015-01-29T18:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793813#M662796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joe thanks for the answear! I cant open the file though, I reach the maximum "opens" for my free license. Can you send me the code in a .txt file?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 18:31:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793813#M662796</guid>
      <dc:creator />
      <dc:date>2015-01-29T18:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793814#M662797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it will work, and yes you'll need a FOR loop, optionally controlled by the FileList() and DirList masks to walk a complete directory or a directory tree. See Desktop help for the FOR EACH statement for an example that reads files from a directory and processes them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The LOAd statement also supports wildcards in the FROM clause, but you cannot use those because you'll loose the opportunity to parse the embedded date and attach it to the corresponding rows.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 18:57:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793814#M662797</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-01-29T18:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793815#M662798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And where should I begin the loop?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I open the loop and put both Loads inside? I shold I change the FROM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;FOR Each vFileName in FileList ('.\Data\Producao NonStop*.txt')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;LOAD @10 as FileDay&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[$(vFileName)]&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, no labels, delimiter is spaces, msq)&lt;/P&gt;&lt;P&gt;WHERE(Len(Trim(@10))&amp;gt;0);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vFileDate = Peek('FileDay',0,'Table1');&lt;/P&gt;&lt;P&gt;DROP table Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD @1 as Volume,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @3 as 'Total Capacity', &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @4 as Free, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @5 as 'Free(%)', &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @6 as Count, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @7 as Biggest,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date($(vFileDate)) as Day&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [$(vFileName)]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (txt, codepage is 1252, no labels, delimiter is spaces, msq, header is 5 lines);&lt;/P&gt;&lt;P&gt;NEXT vFileName&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used this code but it gave several errors.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 19:32:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793815#M662798</guid>
      <dc:creator />
      <dc:date>2015-01-29T19:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793816#M662799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works in my Desktop with your example text file (if I change the filemask from Producao into Qualidade). The Day field contains invalid data, though. Change &lt;SPAN style="font-family: 'courier new', courier;"&gt;date($(vFileDate)) AS Day&lt;/SPAN&gt; into &lt;SPAN style="font-family: 'courier new', courier;"&gt;date('$(vFileDate)') AS Day.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you should add a table name before the second LOAD. Data will AUTOCONCATENATE during each file load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you tell me what error messages you are getting?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 19:57:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793816#M662799</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-01-29T19:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793817#M662800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="script error.png" class="image-1 jive-image" src="/legacyfs/online/76696_script error.png" style="width: 620px; height: 465px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It gives me this error. I dont know why since I creat a table for each loop&amp;nbsp; and then I drop it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 10:16:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793817#M662800</guid>
      <dc:creator />
      <dc:date>2015-01-30T10:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793818#M662801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is weird is that know I have inside the folder (data) 8 files and this script error only happens 5 times!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter many thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 10:19:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793818#M662801</guid>
      <dc:creator />
      <dc:date>2015-01-30T10:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793819#M662802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figure out the problem! I changed the drop. It was between the two LOADS and now I put it after the secound LOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thansk Peter you have been very helpful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 10:31:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793819#M662802</guid>
      <dc:creator />
      <dc:date>2015-01-30T10:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793820#M662803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something is wrong with your first table. After 2 steps, the script seems to store the Date value in table Table1-1 instead of Table1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My suggestion: add a specific table name to your second LOAD, for instance DATA:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 10:34:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793820#M662803</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-01-30T10:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793821#M662804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you think I should do that even though now the script it is working alright? I just changed the location of the drop, and then it started to work OK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 10:57:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793821#M662804</guid>
      <dc:creator />
      <dc:date>2015-01-30T10:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793822#M662805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, when you succeed in loading your text file data into a table, what will be your next step? You won't be able to use the table because it's name will be unknown and may vary with the set of files you are reading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment, I guess it gets its name from the first file you are loading. If this doesn't worry you, then don't change it.&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>Fri, 30 Jan 2015 11:47:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793822#M662805</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-01-30T11:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793823#M662806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're completly right. I follow you advise I put a name on the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the following name:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[$(vFileName)]:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;,though it returns me all the path. How can I select just the name of the file without the rest of the path? e.g. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the output of that tables is: "c:\Documents and Settings\12341008\Desktop\Espaço em Disco\Data\Producao NonStop 20150105.txt". And I just want "Producao NonStop 20150105." for the name of the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you briefly explain why we use the -&amp;nbsp; $&amp;nbsp; - before the object?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And why the code: &lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-family: Courier New;"&gt;($(vFileDate)) AS Day&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt; didn't work but the code&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;SPAN style="font-family: 'courier new', courier;"&gt;date('$(vFileDate)') AS Day&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; worked fine on my script?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 14:44:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793823#M662806</guid>
      <dc:creator />
      <dc:date>2015-01-30T14:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793824#M662807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And on this script all my tables come with the same path (which is the path form the first file, I dont know why it doesnt change while the loop is running). Any thoughts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My current code:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FOR&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Each&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;vFileName&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FileList&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; ('.\Data\Producao NonStop*.txt')&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;// Extract date&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;Table1:&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;@10&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FileDay&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;[$(vFileName)]&lt;BR /&gt;(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;txt&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;codepage&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; 1252, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;no&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;labels&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;delimiter&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; spaces, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;msq&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Len&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Trim&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;@10&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;))&amp;gt;0);&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;LET&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;vFileDate&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;('FileDay',0,'Table1');&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;DROP&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; Table1;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;// Extract data from file +date&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;[$(vFileName)]:&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;@1&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Volume&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;, &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;@3&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;'Total Capacity'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;, &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;@4&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Free&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;, &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;@5&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;'Free(%)'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;, &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;@6&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;, &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;@7&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Biggest&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;,&lt;BR /&gt;('$(vFileDate)') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Day&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;// day added to the table&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;[$(vFileName)]&lt;BR /&gt;(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;txt&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;codepage&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; 1252, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;no&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;labels&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;delimiter&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; spaces, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;msq&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;header&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; 5 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;lines&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;NEXT&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;vFileName&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 14:53:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793824#M662807</guid>
      <dc:creator />
      <dc:date>2015-01-30T14:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793825#M662808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;[$(=FileBaseName('$(vFileName)'))]:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should do the job. But why do you want to load every file in a different table? Why not all in the same table, and add a column that identifies the source file (using the same FileBaseName expression)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's not just the $-sign, it's the $ &lt;EM&gt;and&lt;/EM&gt; the parentheses that force Dollar-sign expansion. Upon evaluation, every single statement goes thru some sort of pre-processor that expands all $() elements into their current content. See Dollar-sign expansion in QV Desktop Help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(vFileDate) expands into 13/5/2015 which is an expression leading to a very small number.&lt;/P&gt;&lt;P&gt;'$(vFileDate)' expands into '13/5/2015' which is a string that is recognized by QlikView as a date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 15:40:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793825#M662808</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-01-30T15:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793826#M662809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the script debugger to step through your script and observe what is happening during each cycle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 15:43:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793826#M662809</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-01-30T15:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to manage with two Loads for one table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793827#M662810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea how can I add another field which is the volume from the last day?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am adding something like this at the end of the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD Free as PreviousFree&lt;/P&gt;&lt;P&gt;Resident Data&lt;/P&gt;&lt;P&gt;//Where Day = Max(Date(Day)-1) and Volume = &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont know if I have to do 2 condition or one it is just enough (or should I do one condition and then group by Day and Volume).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already figured out the logic behind the condition it is to calculate the Maximum from Date(Day)-1. Do you have any suggestion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks one more time for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 16:49:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-manage-with-two-Loads-for-one-table/m-p/793827#M662810</guid>
      <dc:creator />
      <dc:date>2015-02-03T16:49:29Z</dc:date>
    </item>
  </channel>
</rss>

