<?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 for loop or do while in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/for-loop-or-do-while/m-p/189085#M52100</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like this (parts borrowed from a Calender creation script)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;LET vDateMin = Num(MakeDate(2010,1,1));&lt;BR /&gt;LET vDateMax = Num(Today());&lt;BR /&gt;&lt;BR /&gt;// Autoload data files&lt;BR /&gt;TempTable:&lt;BR /&gt;LOAD *,&lt;BR /&gt; Date($(vDateMin),'YYYY-MM-DD') AS LoadDate&lt;BR /&gt;FROM exportfile-Date($(vDateMin),'YYYY-MM-DD').csv (csv)&lt;BR /&gt;WHILE $(vDateMin)+IterNo()-1&amp;lt;= $(vDateMax);&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;It should concatenate all the date csv-files from 2010-01-01 till today.&lt;/P&gt;&lt;P&gt;Not sure if it still works when a file is missing (like if you don't generate a csv-file on sundays).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Mar 2010 15:38:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-03-22T15:38:07Z</dc:date>
    <item>
      <title>for loop or do while</title>
      <link>https://community.qlik.com/t5/QlikView/for-loop-or-do-while/m-p/189084#M52099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt; &lt;w:WordDocument&gt;  &lt;w:View&gt;Normal&lt;/w:View&gt;  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;  &lt;w:PunctuationKerning&gt;&lt;/w:PunctuationKerning&gt;  &lt;w:ValidateAgainstSchemas&gt;&lt;/w:ValidateAgainstSchemas&gt;  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;  &lt;w:Compatibility&gt;   &lt;w:BreakWrappedTables&gt;&lt;/w:BreakWrappedTables&gt;   &lt;w:SnapToGridInCell&gt;&lt;/w:SnapToGridInCell&gt;   &lt;w:WrapTextWithPunct&gt;&lt;/w:WrapTextWithPunct&gt;   &lt;w:UseAsianBreakRules&gt;&lt;/w:UseAsianBreakRules&gt;   &lt;w:DontGrowAutofit&gt;&lt;/w:DontGrowAutofit&gt;  &lt;/w:Compatibility&gt;  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt; &lt;/w:WordDocument&gt;&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt; &lt;w:LatentStyles DefLockedState="false" LatentStyleCount="156"&gt; &lt;/w:LatentStyles&gt;&lt;/xml&gt;&lt;![endif]--&gt;&lt;P&gt;&lt;/P&gt;&lt;!--[if gte mso 10]&gt;&lt;style&gt; /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}&lt;/style&gt;&lt;![endif]--&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one csv files for each day like exportfile-2010-01-01.csv . Starting for 01/01/2010 .. i am able to load the today file using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Datafile:&lt;/P&gt;&lt;P&gt;Load ...&lt;/P&gt;&lt;P&gt;.......&lt;/P&gt;&lt;P&gt;.......&lt;/P&gt;&lt;P&gt;FROM&lt;BR /&gt;&lt;C&gt;.&lt;/C&gt;&lt;/P&gt;&lt;P&gt;Store datafile into C:\QlikView\DevelopmentDocuments\QVD Files\exportfile_$(vtoday).qvd&lt;/P&gt;&lt;P&gt;so it generates one qvd file each day.&lt;/P&gt;&lt;P&gt;but i want generate the backdate files ( starting from 01/01/2010 to 21/03/2010) using loop condition.&lt;/P&gt;&lt;P&gt;Could you please tell me how it can be done in qlikview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Mar 2010 15:23:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/for-loop-or-do-while/m-p/189084#M52099</guid>
      <dc:creator />
      <dc:date>2010-03-22T15:23:55Z</dc:date>
    </item>
    <item>
      <title>for loop or do while</title>
      <link>https://community.qlik.com/t5/QlikView/for-loop-or-do-while/m-p/189085#M52100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like this (parts borrowed from a Calender creation script)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;LET vDateMin = Num(MakeDate(2010,1,1));&lt;BR /&gt;LET vDateMax = Num(Today());&lt;BR /&gt;&lt;BR /&gt;// Autoload data files&lt;BR /&gt;TempTable:&lt;BR /&gt;LOAD *,&lt;BR /&gt; Date($(vDateMin),'YYYY-MM-DD') AS LoadDate&lt;BR /&gt;FROM exportfile-Date($(vDateMin),'YYYY-MM-DD').csv (csv)&lt;BR /&gt;WHILE $(vDateMin)+IterNo()-1&amp;lt;= $(vDateMax);&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;It should concatenate all the date csv-files from 2010-01-01 till today.&lt;/P&gt;&lt;P&gt;Not sure if it still works when a file is missing (like if you don't generate a csv-file on sundays).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Mar 2010 15:38:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/for-loop-or-do-while/m-p/189085#M52100</guid>
      <dc:creator />
      <dc:date>2010-03-22T15:38:07Z</dc:date>
    </item>
    <item>
      <title>for loop or do while</title>
      <link>https://community.qlik.com/t5/QlikView/for-loop-or-do-while/m-p/189086#M52101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;It is just loading only 01/01/2010 file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Mar 2010 16:18:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/for-loop-or-do-while/m-p/189086#M52101</guid>
      <dc:creator />
      <dc:date>2010-03-22T16:18:50Z</dc:date>
    </item>
    <item>
      <title>for loop or do while</title>
      <link>https://community.qlik.com/t5/QlikView/for-loop-or-do-while/m-p/189087#M52102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This should work better &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;LET vDateMin = Num(MakeDate(2010,1,1));&lt;BR /&gt;LET vDateMax = Num(Today());&lt;BR /&gt;&lt;BR /&gt;FOR a=$(vDateMin)&lt;BR /&gt;&lt;BR /&gt;DO WHILE a &amp;lt;= $(vDateMax)&lt;BR /&gt;&lt;BR /&gt;TempTable:&lt;BR /&gt;LOAD *,&lt;BR /&gt; Date(a,'YYYY-MM-DD') AS LoadDate&lt;BR /&gt;FROM exportfile-Date(a,'YYYY-MM-DD').csv (csv);&lt;BR /&gt;&lt;BR /&gt;LET a=a+1;&lt;BR /&gt;&lt;BR /&gt;LOOP&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Mar 2010 18:37:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/for-loop-or-do-while/m-p/189087#M52102</guid>
      <dc:creator />
      <dc:date>2010-03-22T18:37:10Z</dc:date>
    </item>
  </channel>
</rss>

