<?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: Automate data load from files and more in Qlik Automate</title>
    <link>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2428444#M3296</link>
    <description>&lt;P&gt;There is a classic sample to load all files in a directory.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are a lot of variants but this uses just 1 folder and looks for *.log and loads all fields from all matching files using specific encoding, delimiters etc...&lt;/P&gt;
&lt;DIV&gt;In your case, I suggest loading one file manually just to get the options right.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I strongly suggest naming all the columns and filtering out all files that don't match your need.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;You can add other fields like filetime() as well to the LOAD of course and conduct the rest of the required logic.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;FOR each File in filelist ('[lib://&amp;lt;folder&amp;gt;/*.' &amp;amp; 'log]')&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp;LOAD&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; *&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;FROM '$(File)'&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp;(txt, codepage is 28591, embedded labels, delimiter is '\t', msq);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;next File&lt;/DIV&gt;</description>
    <pubDate>Thu, 07 Mar 2024 20:08:29 GMT</pubDate>
    <dc:creator>JonnyPoole</dc:creator>
    <dc:date>2024-03-07T20:08:29Z</dc:date>
    <item>
      <title>Automate data load from files and more</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2428364#M3293</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I'm looking for a solution for the following:&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; Every month we create 3 xls file. For this matter let's call them StepA, StepB, StepC.&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp; Each file represent detailed data of sales for the month.&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp; Each file must be loaded in the order of receiving and override the previous one.&lt;/P&gt;
&lt;P&gt;4.&amp;nbsp; At the end,&amp;nbsp; I want to show a final report which summarizes (maybe in a pivot style) what described in the image attached.&lt;/P&gt;
&lt;P&gt;5. So there are 3 main concerns here:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp;loading the files dynamically for a given month.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp;dynamically add the month column to the sheet as in the attached image.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp;providing a layout like in the attached image.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 16:14:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2428364#M3293</guid>
      <dc:creator>betz</dc:creator>
      <dc:date>2024-03-07T16:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Automate data load from files and more</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2428374#M3294</link>
      <description>&lt;P&gt;You can create the Month value dynamically based on the date of load execution or the date of the file being loaded. For example:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Date(MonthStart(Today(1)), 'MMM-YY') as Month&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;Date&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;MonthStart&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;FileTime&lt;SPAN class="s1"&gt;()), 'MMM-YY') as Month&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="p1"&gt;-Rob&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 16:44:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2428374#M3294</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2024-03-07T16:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Automate data load from files and more</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2428384#M3295</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;Is there a way to dynamically loop through a folder or I must know of each file in advance?&lt;/P&gt;
&lt;P&gt;Also, can you advise re my other questions? re the layout etc?&lt;/P&gt;
&lt;P&gt;Tx&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 17:03:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2428384#M3295</guid>
      <dc:creator>betz</dc:creator>
      <dc:date>2024-03-07T17:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Automate data load from files and more</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2428444#M3296</link>
      <description>&lt;P&gt;There is a classic sample to load all files in a directory.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are a lot of variants but this uses just 1 folder and looks for *.log and loads all fields from all matching files using specific encoding, delimiters etc...&lt;/P&gt;
&lt;DIV&gt;In your case, I suggest loading one file manually just to get the options right.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I strongly suggest naming all the columns and filtering out all files that don't match your need.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;You can add other fields like filetime() as well to the LOAD of course and conduct the rest of the required logic.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;FOR each File in filelist ('[lib://&amp;lt;folder&amp;gt;/*.' &amp;amp; 'log]')&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp;LOAD&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; *&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;FROM '$(File)'&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp;(txt, codepage is 28591, embedded labels, delimiter is '\t', msq);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;next File&lt;/DIV&gt;</description>
      <pubDate>Thu, 07 Mar 2024 20:08:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2428444#M3296</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2024-03-07T20:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Automate data load from files and more</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2428703#M3303</link>
      <description>&lt;P&gt;How would I go with a pivot table or anything similar described in my screenshot?&lt;/P&gt;
&lt;P&gt;I want to achieve a similar layout like in the below image, where for each month I show the &lt;STRONG&gt;quantity&lt;/STRONG&gt; and &lt;STRONG&gt;sales amount&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;by &lt;STRONG&gt;product name&amp;nbsp;&lt;/STRONG&gt;and&amp;nbsp;&lt;STRONG&gt;product description.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Any recommendation?&amp;nbsp; How do I get this If I have a file per month?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="betz_0-1709899220670.png" style="width: 582px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/161592i97379D1D62A3CB64/image-dimensions/582x140?v=v2" width="582" height="140" role="button" title="betz_0-1709899220670.png" alt="betz_0-1709899220670.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 12:04:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2428703#M3303</guid>
      <dc:creator>betz</dc:creator>
      <dc:date>2024-03-08T12:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Automate data load from files and more</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2428744#M3304</link>
      <description>&lt;P&gt;First you need to load all the files into 1 table in the data model using table concatenation. Practice trying to do that in the load script with two of your XLS files. If you can do that successfully, then you can change the FOR loop sample above to your needs so as to get all the XLS files in the directory at once.&amp;nbsp; Once you have that working, you can author a pivot table in the UI.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 13:15:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2428744#M3304</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2024-03-08T13:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Automate data load from files and more</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2428756#M3305</link>
      <description>&lt;P&gt;Thank you JonnyPoole&lt;/P&gt;
&lt;P&gt;So by saying&amp;nbsp;&lt;STRONG&gt;concatenation&amp;nbsp;&lt;/STRONG&gt;you mean a join?&lt;/P&gt;
&lt;P&gt;Let's assume these are the files I have:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Products.xlsx:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;ProductID (PK),ProductName, Price&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;JanaurySales.xlsx:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;SaleID (PK) , ProductID&amp;nbsp; (FK) ,Qty&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;FebruarySales.xlsx:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;SaleID (PK) , ProductID&amp;nbsp; (FK) ,Qty&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(and so on for other months...)&lt;/P&gt;
&lt;P&gt;How do I perform the&amp;nbsp;&lt;STRONG&gt;concatenation&amp;nbsp;&lt;/STRONG&gt;between all the Loads?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does Qlik know to treat each file joined to the Products file as a different join or would it join&lt;/P&gt;
&lt;P&gt;the Products &amp;gt;&amp;gt; Jan &amp;gt;&amp;gt; Feb... etc?&amp;nbsp; For example If I had to do it in SQL then I would have a reference to the Products for each month... wonder if Qlik treats it differently&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 13:42:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2428756#M3305</guid>
      <dc:creator>betz</dc:creator>
      <dc:date>2024-03-08T13:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Automate data load from files and more</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2428761#M3306</link>
      <description>&lt;P&gt;Table concatenation is like 'stacking' all the rows from one LOAD with all the rows from another LOAD. If the fields are named the same, the values from each LOAD are aligned into the right columns. In SQL its like a UNION.&amp;nbsp; In your case&amp;nbsp; you want to loop through all the *Sales.xlsx files in the folder and CONCATENATE (ie: union) all the rows together into one 'Sales' table in your data model. Load the Products.xlsx separately to create a separate 'Products' table.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can probably rely on "automatic concatenation" as described here&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/February2024/Subsystems/Hub/Content/Sense_Hub/LoadData/concatenate-tables.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/February2024/Subsystems/Hub/Content/Sense_Hub/LoadData/concatenate-tables.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonnyPoole_0-1709906207700.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/161608iACB6B6AAB0D77C72/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonnyPoole_0-1709906207700.png" alt="JonnyPoole_0-1709906207700.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 13:57:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2428761#M3306</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2024-03-08T13:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: Automate data load from files and more</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2429188#M3315</link>
      <description>&lt;P&gt;Thanks for that.&lt;/P&gt;
&lt;P&gt;So create the pivot table like the below should be quite easy?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="betz_0-1710144573819.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/161701i547F24FB5A0CDE8F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="betz_0-1710144573819.png" alt="betz_0-1710144573819.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 08:09:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Automate-data-load-from-files-and-more/m-p/2429188#M3315</guid>
      <dc:creator>betz</dc:creator>
      <dc:date>2024-03-11T08:09:41Z</dc:date>
    </item>
  </channel>
</rss>

