<?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: LOOPing for personell_fluctuation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/LOOPing-for-personell-fluctuation/m-p/620994#M228603</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;now I have my loop, but for some reason I cannot see it fails every time - the log shows an "Invalid expression", but no details on the error.&lt;/P&gt;&lt;P&gt;Could it be - the help_text lets me assume sth. like that - that a LOAD statement inside a DO_LOOP must be written all in one line?&lt;/P&gt;&lt;P&gt;=&amp;gt; That is about the only possible reason I can think of: In the example, it is very simple and small and written in one line &amp;lt;=&amp;gt; I routinely write my LOAD_statement in several lines, every field in one line and every part of the WHERE_statement (and there are four parts to it here) in one line.&lt;/P&gt;&lt;P&gt;Could that be the reason the loop fails?&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Mar 2014 16:37:09 GMT</pubDate>
    <dc:creator>datanibbler</dc:creator>
    <dc:date>2014-03-12T16:37:09Z</dc:date>
    <item>
      <title>LOOPing for personell_fluctuation</title>
      <link>https://community.qlik.com/t5/QlikView/LOOPing-for-personell-fluctuation/m-p/620992#M228601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following challenge:&lt;/P&gt;&lt;P&gt;- In my personell_app, there is data on personell_fluctuation, which is defined as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - the nr. of emps who left the company in a given month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - relative to the nr. of emps the company had a month before&lt;/P&gt;&lt;P&gt;- For obvious reasons, this fluctuation is only reliable once a month is "complete" and done with (so today, for instance, I have two, for&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Jan and for Feb)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; I have to create two LOOPs (as the operation I need to do involves a JOIN which doesn't work in just one)&lt;/P&gt;&lt;P&gt;=&amp;gt; Every LOOP should be executed (twice), once for Jan. and once for Feb. (I use a counter i which shall be &amp;lt; 3). I try doing a DO_LOOP (before, I had a FOR loop, but I want to make it dynamic)&lt;/P&gt;&lt;P&gt;=&amp;gt; For some reason, I cannot yet get that to work in the sense of producing a table with two records: I only get one, which means the&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2nd iteration of the LOOP overwrites the 1st.&lt;BR /&gt;&amp;nbsp; =&amp;gt; How can I avoid this?&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: I can tell that the LOOP as such is working:&lt;/P&gt;&lt;P&gt;- In the log, I can see two iterations&lt;/P&gt;&lt;P&gt;- The variable i has the value 3 after script_execution&lt;/P&gt;&lt;P&gt;=&amp;gt; The table should have two records (one per iteration), but that is not the case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 15:59:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LOOPing-for-personell-fluctuation/m-p/620992#M228601</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-03-10T15:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: LOOPing for personell_fluctuation</title>
      <link>https://community.qlik.com/t5/QlikView/LOOPing-for-personell-fluctuation/m-p/620993#M228602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest you creates a small example with dummy-data then without it's rather guessing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 16:17:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LOOPing-for-personell-fluctuation/m-p/620993#M228602</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-03-10T16:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: LOOPing for personell_fluctuation</title>
      <link>https://community.qlik.com/t5/QlikView/LOOPing-for-personell-fluctuation/m-p/620994#M228603</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;now I have my loop, but for some reason I cannot see it fails every time - the log shows an "Invalid expression", but no details on the error.&lt;/P&gt;&lt;P&gt;Could it be - the help_text lets me assume sth. like that - that a LOAD statement inside a DO_LOOP must be written all in one line?&lt;/P&gt;&lt;P&gt;=&amp;gt; That is about the only possible reason I can think of: In the example, it is very simple and small and written in one line &amp;lt;=&amp;gt; I routinely write my LOAD_statement in several lines, every field in one line and every part of the WHERE_statement (and there are four parts to it here) in one line.&lt;/P&gt;&lt;P&gt;Could that be the reason the loop fails?&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2014 16:37:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LOOPing-for-personell-fluctuation/m-p/620994#M228603</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-03-12T16:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: LOOPing for personell_fluctuation</title>
      <link>https://community.qlik.com/t5/QlikView/LOOPing-for-personell-fluctuation/m-p/620995#M228604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DataNibbler,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one line relates only for control-statements and not for load-statements. I assume that really a invalid expression occurred perhaps caused through a variable with NULL. You could find it per "trace Variable;" or per using from script-debugger. If this not worked post your loop-script.&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, 14 Mar 2014 11:26:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LOOPing-for-personell-fluctuation/m-p/620995#M228604</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-03-14T11:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: LOOPing for personell_fluctuation</title>
      <link>https://community.qlik.com/t5/QlikView/LOOPing-for-personell-fluctuation/m-p/620996#M228605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;consider this solved.&lt;/P&gt;&lt;P&gt;I still have no idea exactly what happened, but basically, in one iteration of my LOOP there were no records that matched all of my WHERE criteria. So nothing was loaded.&lt;/P&gt;&lt;P&gt;I worked around that by implementing a "failsafe", a dummy record to be loaded when the actual LOAD fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; Now I am looking at creating a join_field to join the two tables I get as a result from the two separate LOOPs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 11:36:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/LOOPing-for-personell-fluctuation/m-p/620996#M228605</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-03-14T11:36:23Z</dc:date>
    </item>
  </channel>
</rss>

