<?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: Do while loop in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Do-while-loop/m-p/907461#M315217</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you should put some trace-statements within your which return your do while variables, especially something like vweekstart - vweekend to see could it be calculated. In general it's recommended to use for each calculation or comparison numeric values, maybe something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do while num($(vweekstart)) &amp;lt;= num($(vweekend))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and uncomment your select-load for the testings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 02 Aug 2015 10:59:16 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2015-08-02T10:59:16Z</dc:date>
    <item>
      <title>Do while loop</title>
      <link>https://community.qlik.com/t5/QlikView/Do-while-loop/m-p/907460#M315216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have problem with do while loop .Its not quiting the loop even after meeting the&amp;nbsp;&amp;nbsp; condition.&lt;/P&gt;&lt;P&gt;It is continuously running the loop.&lt;/P&gt;&lt;P&gt;Here is my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do while vweekstart&amp;lt;=vweekend&lt;/P&gt;&lt;P&gt;let vnewweekend =date(date#(vweekstart)+6);&lt;/P&gt;&lt;P&gt;fct_sales:&lt;/P&gt;&lt;P&gt;Select * from FctSales where DATE_KEY BETWEEN '$(vweekstart)' AND '$(vnewweekend)'&lt;/P&gt;&lt;P&gt;let file = Year(date#(vweekstart))&amp;amp;week(date#(vweekstart));&lt;/P&gt;&lt;P&gt;trace file= $(file);&lt;/P&gt;&lt;P&gt;//Store and Drop Table &lt;/P&gt;&lt;P&gt;STORE FCT_DAILY_SALES INTO [./Qvd/$(file).QVD];&lt;/P&gt;&lt;P&gt;DROP TABLE FCT_SALES;&lt;/P&gt;&lt;P&gt;let vweekstart = date(date#(vweekstart)+7);&lt;/P&gt;&lt;P&gt;LOOP;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Aug 2015 10:40:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-while-loop/m-p/907460#M315216</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-02T10:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Do while loop</title>
      <link>https://community.qlik.com/t5/QlikView/Do-while-loop/m-p/907461#M315217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you should put some trace-statements within your which return your do while variables, especially something like vweekstart - vweekend to see could it be calculated. In general it's recommended to use for each calculation or comparison numeric values, maybe something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do while num($(vweekstart)) &amp;lt;= num($(vweekend))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and uncomment your select-load for the testings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Aug 2015 10:59:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-while-loop/m-p/907461#M315217</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-08-02T10:59:16Z</dc:date>
    </item>
  </channel>
</rss>

