<?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 Writing a loop in my load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Writing-a-loop-in-my-load-script/m-p/833644#M655568</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Qlikviewers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a script that works fine. The first part determines the most recent date for which all reports are available and then I use a LET statement to determine which report should be loaded in the later parts. The second part loads all trade positions, which have 2 lines per position, this part transforms the data so that each position has 1 line. In the 3rd part, I load all the reports that I need and join them togethether to make one large table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This script finally results in a table that has all the information that I need from all the seperate accounts together.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now here is the trouble. This table has the most recent data available, but it does not include data from earlier reports. I want to use historic data in my dashboard so I can see from our reports how things have developed over time, create benchmarks etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to write a loop for this script using all sorts of information from different topics within the Qlikview community website. However, I have yet to find a solution. I must say I am really new to scripting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking that the easiest way to go would be to take the minimum date and then let a loop add one day to the date every time and I each time add the timestamp to the table so I can distinguish between dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the file is not available, it should skip to the next date. But it should also skip the day if not ALL files are available for that date. How would I go about writing such a script? I have tried some loops, but none has proven to be successful so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My filenames all end with the date 'DDMMYYYY', the reports are all in csv format, but the positions are in an excel table (xls). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Jun 2015 15:40:33 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-06-16T15:40:33Z</dc:date>
    <item>
      <title>Writing a loop in my load script</title>
      <link>https://community.qlik.com/t5/QlikView/Writing-a-loop-in-my-load-script/m-p/833644#M655568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Qlikviewers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a script that works fine. The first part determines the most recent date for which all reports are available and then I use a LET statement to determine which report should be loaded in the later parts. The second part loads all trade positions, which have 2 lines per position, this part transforms the data so that each position has 1 line. In the 3rd part, I load all the reports that I need and join them togethether to make one large table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This script finally results in a table that has all the information that I need from all the seperate accounts together.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now here is the trouble. This table has the most recent data available, but it does not include data from earlier reports. I want to use historic data in my dashboard so I can see from our reports how things have developed over time, create benchmarks etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to write a loop for this script using all sorts of information from different topics within the Qlikview community website. However, I have yet to find a solution. I must say I am really new to scripting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking that the easiest way to go would be to take the minimum date and then let a loop add one day to the date every time and I each time add the timestamp to the table so I can distinguish between dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the file is not available, it should skip to the next date. But it should also skip the day if not ALL files are available for that date. How would I go about writing such a script? I have tried some loops, but none has proven to be successful so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My filenames all end with the date 'DDMMYYYY', the reports are all in csv format, but the positions are in an excel table (xls). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 15:40:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Writing-a-loop-in-my-load-script/m-p/833644#M655568</guid>
      <dc:creator />
      <dc:date>2015-06-16T15:40:33Z</dc:date>
    </item>
  </channel>
</rss>

