<?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 and extract information from multiple CSV files in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444971#M610255</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Below your load-statement you could just count the files with each iteration, maybe with something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vFileCounter = rangesum($(vFileCounter), 1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. I think this condition needs to applied between "for each FoundFile ..." and the load with something:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if YourDateExpressionOnFilename &amp;gt;= today() - 30 then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; load ...&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Trace 'condition not valid and therefore skipping the load of $(FoundFile)';&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Dec 2017 14:25:47 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2017-12-12T14:25:47Z</dc:date>
    <item>
      <title>How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444966#M610243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Hey guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm a newbie in the Qlikview world and require your support in resolving 2 queries:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I intend to read data into Qlikview from multiple CSV files and correspondingly, use that data to plot a graph.&amp;nbsp; Each of these files also contain some unwanted header information and the data to be read from all files is also identical&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My intention is to load these files, delimit them to remove the unwanted headers and to extract the required data information into separate tables.[For&amp;nbsp; Y1, Y2]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. I loaded a single CSV file and tried to extract the required data. The script runs successfully, but I did not receive any information in the corresponding fields. Please find code used for this particular operation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I did not face this problem while importing and carrying out the operation on a XLS file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;A:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"X [ms]"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Y1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Y2&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Y3&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Y4&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Y5&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Y6&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Y7&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Y8&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Data&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&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[..\Test.csv]&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;txt&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;codepage&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; 1252, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;embedded&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;labels&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;delimiter&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ',', &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;msq&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;header&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; 17 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;lines&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;);&lt;BR /&gt; B:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;SubField&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Data&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, ',' ,5) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Relative&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;SubField&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Data&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, ',' ,2) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Bit&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;Resident&lt;/SPAN&gt;&lt;SPAN&gt; A;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DROP&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; A; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Could anyone suggest the best way to carry out these activities?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!! .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2017 10:23:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444966#M610243</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-07T10:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444967#M610244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that the load-result from A is quite different to your expectation and load B doesn't make much such sense on it. Therefore add a rowno() to load A and uncomment load B and the drop-statement and take a look on these data within a tablebox - I assume this B load won't be needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 08:37:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444967#M610244</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-12-08T08:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444968#M610246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, you're right. This was an incorrect approach that I took to load the CSV files. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the header information for all the CSV files were the same, I used the * operator to import all the files into Qlikview. As a follow-up question, if I want to extract some information as a separate list for each file imported, what must be done to achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg: The information from the field Y1 must be present as a separate list from all the files imported [Y1 from file 1 is one list, Y1 from file 2 is a separate list table]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Suraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2017 22:12:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444968#M610246</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-08T22:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444969#M610249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wouldn't do it in this way. If you have for example 100 files you would get 100 separate Y-fields which would be quite difficult to handle as dimensions and also within expressions.&lt;/P&gt;&lt;P&gt;More common is the approach to load all these data into a single table respectively field and to tag their sources. For this you could add for example filename() or filebasename() - maybe with some further text-functions like subfield(), mid(), left(), right() to extract valuable meta-informations from the path and/or the filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These field(s) could be later used for selections or as a filter within the expressions, for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({&amp;lt; SourceField = {'SourceFieldValue1'}&amp;gt;} Y)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Dec 2017 08:05:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444969#M610249</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-12-09T08:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444970#M610252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, that makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have implemented the file loading as given in the below code.&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" height="427" src="https://community.qlik.com/legacyfs/online/186655_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" width="863" /&gt;&lt;/P&gt;&lt;P&gt;Now, I'm able to carry out the filtering between the files by the date and time stamp information given in the file name. Thanks for your suggestions!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I'm still facing an issue with regard to the below 2 topics:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Finding the total count of CSV files imported:&lt;/P&gt;&lt;P&gt;I tried using the Noofrows(' FileList') function but didn't return any data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Only choosing particular files to import:&lt;/P&gt;&lt;P&gt;Tried using an IF Statement before the FoundFile For Loop, but it didn't help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions to resolve these issues?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Suraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 13:49:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444970#M610252</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-12T13:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444971#M610255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Below your load-statement you could just count the files with each iteration, maybe with something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vFileCounter = rangesum($(vFileCounter), 1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. I think this condition needs to applied between "for each FoundFile ..." and the load with something:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if YourDateExpressionOnFilename &amp;gt;= today() - 30 then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; load ...&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Trace 'condition not valid and therefore skipping the load of $(FoundFile)';&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 14:25:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444971#M610255</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-12-12T14:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444972#M610257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Suraj,&lt;/P&gt;&lt;P&gt;For your items:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#1 - the expression: COUNT(DISTINCT [FileName]) should produce your number of input files &lt;EM&gt;(so long as you did not read two files with the identical same name.&amp;nbsp; If that is a possibility, then disambiguate with the full path)&lt;BR /&gt;&lt;/EM&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;#2 - can you provide the criteria being used for when to parse/pass on the file iteration?&amp;nbsp; You're on the right track with an IF statement, but maybe it needs adjustment in it's execution.&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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, some suggestions regarding your syntax:&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;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//this sequence addresses the issue of needing syntax that does NOT concatenate on the first pass, but wants concatenation on all subsequent passes.&lt;BR /&gt; //The inherent "auto-concatenation" feature of QlikView is very convenient, but also unyieldingly precise in requiring all subsequent table structures &lt;BR /&gt; //be identical in terms of table structure. Very often auto-concatenation collections are "detached" by renaming a single column, &lt;BR /&gt; //or when wildcard is involved, by adding an extra field&lt;BR /&gt; //therefore, "forced" concatenation will collect the target tables even if they vary by even minor or insignificant structure details&lt;BR /&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//Try adjusting this...&lt;BR /&gt; &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;&lt;STRONG&gt;Set&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;vConcatenate&lt;/EM&gt;&lt;/STRONG&gt;&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;&lt;STRONG&gt;For&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;each&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;FoundFile&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;filelist&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Dir&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;BR /&gt; &lt;BR /&gt; FileList:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vConcatenate)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; LOAD 'the syntax parser is interrupted because of the variable. Not a breakage, and the script will run, but it looks awkward' AS FileName AUTOGENERATE(1);&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;Set&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;vConcatenate&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = Concatenate;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;Next&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;FoundFile&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;IMG __jive_id="186664" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/186664_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//...with this&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[FileList]&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;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; '' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FileName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Autogenerate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(0); &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//you now have an empty "placeholder" table to attach 1..N load statements&lt;BR /&gt; &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;&lt;STRONG&gt;For&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;each&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;FoundFile&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;filelist&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Dir&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;CONCATENATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(FileList)&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; '$(FoundFile)' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FileName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AUTOGENERATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(1)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;/*alternative that would allow the function FileBaseName() to be used in this context&lt;BR /&gt; FIRST 1 LOAD FileBaseName()&amp;nbsp; AS FileName&lt;BR /&gt; FROM [$(FoundFile)]&amp;nbsp; //you need to add file specific import settings here&lt;BR /&gt; */ &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;Next&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;FoundFile&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;/*forewarning: the QlikView, recursive, nested ScanFolder sequence works pretty well... when the filenames &amp;amp; paths are cooperative. &lt;BR /&gt; If you're in a 'hostile' environment &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;,&amp;nbsp; file paths will attempt not to cooperate by throwing any kind of programmatic interruptions they can find&lt;BR /&gt; in the file iteration sequences, including various types of quotes and other programmatic characters in the file path. &lt;EM&gt;(i.e try throwing single quotes in the paths)&lt;/EM&gt;&lt;BR /&gt; &lt;BR /&gt; Also, links can somehow create infinite loops of recursion. For the most industrially robust set of file iteration, sometimes it may be &lt;BR /&gt; beneficial to collect a manifest of input files from other software (perhaps Powershell), and then load that set of isolated targeted files via&lt;BR /&gt; manifest.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; the iteration sequence here does work, but it also has interruption vectors*/ &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 14:27:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444972#M610257</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2017-12-12T14:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444973#M610260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also... wondering about embedded messaging stuff in here.. like load 2,5 [X ms].&amp;nbsp; is this a Christmas card? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 15:43:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444973#M610260</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2017-12-12T15:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444974#M610263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I'm still confused with regard to understanding and implementing your suggestion for finding the count of the files imported. Tried implmenting as below, but it threw up errors. Could you please explain it again?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;IMG class="jive-image image-1" height="269" src="https://community.qlik.com/legacyfs/online/186676_pastedImage_2.png" style="width: 564px; height: 258px;" width="869" /&gt;&lt;/P&gt;&lt;P&gt;2.For the conditional check, I intend to select files back on the text content of their names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; For example, if I have 4 files AB1.csv, AB2.csv, HV1.csv and HV2.CSV, I would like to only select all the files containing the AB text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried implementing something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If( (Left (FileBaseName(),2 = 'AB')) then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; LOAD&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Exit&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, unfortunately it did not work. How would I need to go about tackling this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe for later revisions, your suggestion for using the date mightbe useful to me to select the data relevant for that measured period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Suraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 15:53:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444974#M610263</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-12T15:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444975#M610265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Evan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sadly, it's not a Christmas Card. It's just data fields pulled from a sensor with the data read every 2.5 ms &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the suggestions and the feedback. But, have some follow queries with the same:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Tried loading COUNT(DISTINCT [FileName]). The script runs, but I do not get the variable under which the values are stored as a field after reloading.&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/186683_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;After reloading:&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/186684_pastedImage_2.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. I have mentioned the conditions required to parse and select the data in an earlier reply to Marcus. You can refer that and please let me know if further details are required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your alternative Syntax suggestion, the field to be entered in Dir can directly be ('Folder Path' &amp;amp; '\*.csv)?' &lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/186685_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;We use concatenate to append the information of the last loaded file in the table and we generate 1 for every file loaded. Is my understanding right? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have absolutely no background in Qlikview or analytics and just want to understand as much as possible with regard to the implementation and to effectively utilise the tool for my work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Suraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 16:20:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444975#M610265</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-12T16:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444976#M610266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Normally the not initialized variable of vFileCounter should return NULL by the first call and rangesum() should just ignore it. Therefore the error-message looked quite odd. Nevertheless you could initialize the variable before the for-loop with something like: let vFileCounter = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Here you couldn't use filebasename() else the variable FoundFile maybe in this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if left(subfield(FoundFile, '\', -1), 2) = 'AB' then&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 16:27:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444976#M610266</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-12-12T16:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444977#M610267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Suraj Ramachandrappa wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I tried implementing something like this:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;If( (Left (FileBaseName(),2 = 'AB')) then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; LOAD&lt;/P&gt;
&lt;P&gt;else&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; Exit&lt;/P&gt;
&lt;P&gt;end if&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;But, unfortunately it did not work. How would I need to go about tackling this?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Suraj&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This particular portion is not working because FileBaseName() is not a function available in this context of your looping sequence &lt;EM&gt;(has to be used in conjunction with a load statement inside your file-loop)&lt;/EM&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;Instead switch your logic to look for matches in your looping variable $(FoundFile)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(FoundFile) will be assigned full paths, so when parsing for the file name you have to strip off the last sub-segment in the path tree.&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;Subfield('$(FoundFile)','\',-1)&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//should isolate the FileBaseName + Extension&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;BR /&gt; IF&lt;/SPAN&gt;&lt;STRONG style=": ; color: #ff0000; font-size: 8pt;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; Left( Upper(Subfield('$(FoundFile)','\',-1)) , 2) = 'AB' THEN&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//case-sensitive, maybe throw in an upper for extra-measure&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; Trace you could give her this;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;ELSE&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Trace&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; Or you could give her that;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;END&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;IF&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>Tue, 12 Dec 2017 17:09:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444977#M610267</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2017-12-12T17:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444978#M610268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Suraj Ramachandrappa wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hello Evan,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Sadly, it's not a Christmas Card. It's just data fields pulled from a sensor with the data read every 2.5 ms &lt;SPAN class="emoticon-inline emoticon_sad" style="width: 16px; height: 16px;"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thank you for the suggestions and the feedback. But, have some follow queries with the same:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;1. Tried loading COUNT(DISTINCT [FileName]). The script runs, but I do not get the variable under which the values are stored as a field after reloading.&lt;/P&gt;
&lt;P&gt;&lt;IMG __jive_id="186687" class="jive-image image-1" height="98" src="https://community.qlik.com/legacyfs/online/186687_pastedImage_1.png" width="927" /&gt;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Suraj&lt;/P&gt;


&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding this issue... the approach suggested was to use a user-interface expression to calculate your number of distinct input files.&amp;nbsp; You don't use this in the script portion to assign a variable &lt;EM&gt;(you could do this, but my suggestion sidestepped this approach)&lt;BR /&gt;&lt;/EM&gt;&lt;BR /&gt;If after reloading you have the field [FileName] present in the data model, then create a text box and assign the expression =COUNT(DISTINCT [FileName]).&amp;nbsp; This should be a readily available count of your inputs, and unless there's some other reason you need the count of files recorded to table and/or variable, there's no rule that says you have to calculate this via scripting.&amp;nbsp; If you do have to tabulate during scripting, then techniques incrementing the counter per loop pass &lt;EM&gt;(even incrementing conditionally whether falling into IF criteria), &lt;/EM&gt;as Marcus has pointed out, should work fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 17:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444978#M610268</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2017-12-12T17:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444979#M610269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Yes, count() won't work to assign a value to a variable - it's an aggregation-function and worked within the gui or in the script in an aggregation-load with group by clause. Here within the script you could use instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vTotFileCount&amp;nbsp; = fieldvaluecount('FileName');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If there is just one folder you don't need a loop through folders and could just put the path into filedir(). The same is with the extension - with just one extension it's not needed. If there are more than one extension and/or the files have different data-sructure you would need to query which value has the current file to choose within further if-loops or case-statements which file-format and load-statement should be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An explicit concatenate-statement is only needed if the data-structure could be differ in some way otherwise the automatic table-concatenation from Qlik would do the job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2017 07:53:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444979#M610269</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-12-13T07:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444980#M610270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, your impementation suggestion for counting the number of files worked perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have attached a screenshot of the same below:&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/186819_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, the conditional check&amp;nbsp; worked as per my expectations. Using the mid/left/ right functions, can accordingly select the data to be checked:&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/186820_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Suraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2017 14:25:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444980#M610270</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-13T14:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444981#M610271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Marcus and Evan for your valuable suggestions!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Suraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2017 14:29:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444981#M610271</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-13T14:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444982#M610272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Marcus Sommer wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;An explicit concatenate-statement is only needed if the data-structure could be differ in some way otherwise the automatic table-concatenation from Qlik would do the job.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mentioning again...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Automatic table-concatenation feature is a beautiful idea, but probably only safe for use if you're in a controlled lab environment, or directly prepare the formats/structures of your own data inputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With zero exaggeration, probably every auto-concatenation I've attempted to use in which data inputs were prepared by another party, without exception were eventually disrupted by an unannounced upstream table structure change &lt;EM&gt;(either an add, drop, or alias)&lt;/EM&gt;.&amp;nbsp; If you're going to develop around an auto-concatenation, make sure you get your data providers to commit to a stable format.&amp;nbsp; It is an amazing technical feature, but sometimes you have to take into account the human element.&lt;/P&gt;&lt;P&gt;~E&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2017 17:51:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444982#M610272</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2017-12-13T17:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444983#M610273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right that it need some attention. In my case I control most of my data-sources and usually don't load the rawdata with the wildcard * else with explicit named fields so that the risk of any failure is quite small especially to any unnoticed failures - if a field is missing the script will stop and if there is something new what will break the automatic concatenation I will probably get huge synthetic keys which are also quite unlikely not to notice.&lt;/P&gt;&lt;P&gt;And if I would just fix it ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2017 18:06:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444983#M610273</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-12-13T18:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to load and extract information from multiple CSV files</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444984#M610274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agree, been through all of those scenarios, many times.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2017 05:28:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-load-and-extract-information-from-multiple-CSV-files/m-p/1444984#M610274</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2017-12-14T05:28:43Z</dc:date>
    </item>
  </channel>
</rss>

