<?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: Generate Fields and Rows within a loop in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Generate-Fields-and-Rows-within-a-loop/m-p/1795433#M1211153</link>
    <description>&lt;P&gt;Maybe like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;Set a=1;
Set b=1;
Set y=5;

Do while a&amp;lt;y

     Load $(a)-1 as a, $(b) as b AutoGenerate(1) Where $(a)-1&amp;lt;&amp;gt;0;
	 Let b=b+a*2;
     Let a=a+1;
Loop&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Mar 2021 20:03:33 GMT</pubDate>
    <dc:creator>Frank_Hartmann</dc:creator>
    <dc:date>2021-03-29T20:03:33Z</dc:date>
    <item>
      <title>Generate Fields and Rows within a loop</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-Fields-and-Rows-within-a-loop/m-p/1795387#M1211147</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Hi all,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;simplified, there are here a while loop and statements:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;EM&gt;set y=4;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;EM&gt;let b=0;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;EM&gt;let a=0;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;EM&gt;do while a&amp;lt;y&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;EM&gt;let a=a+1&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;EM&gt;let b=b+a*2&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;EM&gt;loop&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;I want to generate this:&lt;/FONT&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;a&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;b&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;1&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;3&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;7&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;3&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;13&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&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 16:50:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-Fields-and-Rows-within-a-loop/m-p/1795387#M1211147</guid>
      <dc:creator>AmCh</dc:creator>
      <dc:date>2021-03-29T16:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Fields and Rows within a loop</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-Fields-and-Rows-within-a-loop/m-p/1795426#M1211152</link>
      <description>&lt;P&gt;Using a and b as both variable names and column names isn't the best idea, so I will refer to the variables as vA and vB here...&lt;/P&gt;&lt;P&gt;After setting the variables,&lt;/P&gt;&lt;P&gt;Load vA as a, vB as B&lt;/P&gt;&lt;P&gt;Autogenerate(1);&lt;/P&gt;&lt;P&gt;loop;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 19:41:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-Fields-and-Rows-within-a-loop/m-p/1795426#M1211152</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2021-03-29T19:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Fields and Rows within a loop</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-Fields-and-Rows-within-a-loop/m-p/1795433#M1211153</link>
      <description>&lt;P&gt;Maybe like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;Set a=1;
Set b=1;
Set y=5;

Do while a&amp;lt;y

     Load $(a)-1 as a, $(b) as b AutoGenerate(1) Where $(a)-1&amp;lt;&amp;gt;0;
	 Let b=b+a*2;
     Let a=a+1;
Loop&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 20:03:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-Fields-and-Rows-within-a-loop/m-p/1795433#M1211153</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2021-03-29T20:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Fields and Rows within a loop</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-Fields-and-Rows-within-a-loop/m-p/1795469#M1211156</link>
      <description>&lt;P&gt;Thank you for your reply. It works with that example. But as I tried to implement it to the concrete example; it showed an error message:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;'Field names must be unique within table'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;set v_max=34.72;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;set delta=0.1&lt;BR /&gt;set s_k=3800;&lt;BR /&gt;set m=126000;&lt;BR /&gt;set delta_m=10000;&lt;BR /&gt;set factor_m=1.05;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;do while v_a&amp;lt;$(v_max) and s_a&amp;lt;$(s_k)/2&lt;BR /&gt;LOAD $(t_a) as t_a,$(a1) as a1 AutoGenerate(1);&lt;BR /&gt;let b1=(F_a(v_a))/(m*$(factor_m)+$(delta_m));&lt;BR /&gt;let v_a=v_a+(a1+b1)*$(delta)/2;&lt;BR /&gt;let a1=b1;&lt;BR /&gt;let s_a=s_a+(c1+v_a)*$(delta)/2;&lt;BR /&gt;let c1=v_a;&lt;BR /&gt;let t_a=t_a+$(delta);&lt;BR /&gt;loop&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I couldn't understand, where is the main difference here showing the error message.&lt;BR /&gt;Any help please?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 22:50:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-Fields-and-Rows-within-a-loop/m-p/1795469#M1211156</guid>
      <dc:creator>AmCh</dc:creator>
      <dc:date>2021-03-29T22:50:44Z</dc:date>
    </item>
  </channel>
</rss>

