<?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: Field generation within while loop in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1790192#M1210536</link>
    <description>&lt;P&gt;assuming the loop is already working and that the t , delta, and w already exists as variables:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;noconcatenate TABLE: load null() as t autogenerate(0);
do while t&amp;lt;b
let W=$(W)+$(t)*$(t);
let t=$(t)+$(delta);
concatenate(TABLE) load $(t) as t, $(W) as W autogenerate(1);
Loop&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;when you use the variable i think you need to encapsulate it with $().&amp;nbsp; but you need to test it&lt;/P&gt;</description>
    <pubDate>Wed, 10 Mar 2021 17:52:28 GMT</pubDate>
    <dc:creator>edwin</dc:creator>
    <dc:date>2021-03-10T17:52:28Z</dc:date>
    <item>
      <title>Field generation within while loop</title>
      <link>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1789989#M1210508</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;In a while loop I am supposed to calculate a value in each iteration.&lt;/P&gt;&lt;P&gt;As an example:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;set b=2;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;set a=0;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;set n=100;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;set delta=(b-a)/n;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;do while t&amp;lt;b&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;let W=W+$(t)*$(t);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;let t=t+delta;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Loop&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For post-processing, I would like to store these values in a field to be able to display them later in a diagram. For the chart I would need dimension and expression.&lt;/P&gt;&lt;P&gt;Dimension=values of t&lt;/P&gt;&lt;P&gt;Expression=values of W&lt;/P&gt;&lt;P&gt;Can someone please help me?&lt;/P&gt;&lt;P&gt;Thank you very much in advance.&lt;/P&gt;&lt;P&gt;With kind regards&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 11:41:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1789989#M1210508</guid>
      <dc:creator>AmCh</dc:creator>
      <dc:date>2021-03-10T11:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Field generation within while loop</title>
      <link>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1790192#M1210536</link>
      <description>&lt;P&gt;assuming the loop is already working and that the t , delta, and w already exists as variables:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;noconcatenate TABLE: load null() as t autogenerate(0);
do while t&amp;lt;b
let W=$(W)+$(t)*$(t);
let t=$(t)+$(delta);
concatenate(TABLE) load $(t) as t, $(W) as W autogenerate(1);
Loop&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;when you use the variable i think you need to encapsulate it with $().&amp;nbsp; but you need to test it&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 17:52:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1790192#M1210536</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-03-10T17:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Field generation within while loop</title>
      <link>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1790193#M1210537</link>
      <description>&lt;P&gt;this look the same as a different post&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 17:53:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1790193#M1210537</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-03-10T17:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Field generation within while loop</title>
      <link>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1790267#M1210545</link>
      <description>&lt;P&gt;Thank you for your prompt response.&lt;/P&gt;&lt;P&gt;What do you mean with that t, delta and w already exist as variable?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;t&lt;/STRONG&gt; is an increment variable within the loop. It should not be pre-defined.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;delta&lt;/STRONG&gt; is already pre-defined as : &lt;EM&gt;set delta=(b-a)/n&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;w&lt;/STRONG&gt; should be created within the loop. It should not be pre-defined.&lt;BR /&gt;&lt;BR /&gt;Another problem here that I couldn't increment with a non decimal value. (e.g. delta=0.5)&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 20:12:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1790267#M1210545</guid>
      <dc:creator>AmCh</dc:creator>
      <dc:date>2021-03-10T20:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Field generation within while loop</title>
      <link>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1790271#M1210547</link>
      <description>&lt;P&gt;if your increment is by .5 from 0 to 4 for example, you can loop from 0 to 8 and just divide your counter by 2 to simulate a .5 increment&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 20:21:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1790271#M1210547</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-03-10T20:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Field generation within while loop</title>
      <link>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1790273#M1210548</link>
      <description>&lt;P&gt;Thank you. It worked with the increment. But it didn't with the main problem; storing of variables within the while loop.&lt;BR /&gt;Can you help me further.&lt;BR /&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 20:29:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1790273#M1210548</guid>
      <dc:creator>AmCh</dc:creator>
      <dc:date>2021-03-10T20:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Field generation within while loop</title>
      <link>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1790287#M1210550</link>
      <description>&lt;P&gt;when you say it didnt work, what didnt work?&amp;nbsp; was there an error message?&amp;nbsp; can you give a hint?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 21:49:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1790287#M1210550</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-03-10T21:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Field generation within while loop</title>
      <link>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1790507#M1210583</link>
      <description>&lt;P&gt;try this:&lt;/P&gt;&lt;P&gt;set b=2;&lt;BR /&gt;set a=0;&lt;BR /&gt;set n=100;&lt;BR /&gt;set delta=(b-a)/n;&lt;/P&gt;&lt;P&gt;let W=0;&lt;BR /&gt;let t=0;&lt;/P&gt;&lt;P&gt;data:&lt;BR /&gt;load null() as t AutoGenerate(0);&lt;/P&gt;&lt;P&gt;do while t&amp;lt;b&lt;BR /&gt;let W=W+t*t;&lt;BR /&gt;let t=t+$(delta);&lt;BR /&gt;concatenate (data) load $(t) as t, $(W) as W AutoGenerate(1);&lt;BR /&gt;Loop&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 13:08:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1790507#M1210583</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-03-11T13:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Field generation within while loop</title>
      <link>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1795362#M1211142</link>
      <description>&lt;P&gt;Hi edwin,&lt;/P&gt;&lt;P&gt;thank you for your reply. Unfortunately this error messages appears:&lt;/P&gt;&lt;P&gt;'Field names must be unique within table'&lt;/P&gt;&lt;P&gt;Only two fields should be generated (t and W)&lt;BR /&gt;I want to generate rows in respective fields.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help please?&lt;BR /&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 15:44:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1795362#M1211142</guid>
      <dc:creator>AmCh</dc:creator>
      <dc:date>2021-03-29T15:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: Field generation within while loop</title>
      <link>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1798470#M1211461</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/132984"&gt;@AmCh&lt;/a&gt;&amp;nbsp;i ran the script and there weren't any errors.&amp;nbsp; this means you modified it and i get that.&amp;nbsp; if you still need help maybe you can share your script?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 20:18:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-generation-within-while-loop/m-p/1798470#M1211461</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-04-09T20:18:26Z</dc:date>
    </item>
  </channel>
</rss>

