<?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 in script for dynamic field(calculated on condition) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/For-loop-in-script-for-dynamic-field-calculated-on-condition/m-p/56663#M9455</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;&lt;/P&gt;&lt;P&gt;I want to generate a table like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="195438" alt="Capture.PNG" class="jive-image image-1" height="103" src="https://community.qlik.com/legacyfs/online/195438_Capture.PNG" style="height: 103px; width: 780.037px;" width="780" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loco number is autogenerated field (through Rowno() i made it in backend)&lt;/P&gt;&lt;P&gt;Green highlighted columns will be given,rest all need to be filled accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #003366; text-decoration: underline;"&gt;&lt;STRONG&gt;Logic is :&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Yellow highlighted columns i.e. Loco Numbers must be filled by the [Total Units Recieved]/[Units/Loco] value.&lt;/P&gt;&lt;P&gt;For eg. if Total units received is 20 and Units/loco is 4 then till 5 locos 1,2,3,4,5 it should be filled.Likewise for all row values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried by loop but i don't know where am i losing it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Code i wrote&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt; :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test_Unit_Table:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Rowno() as Loco_No_1,&lt;/P&gt;&lt;P&gt;[Units/Loco],&lt;/P&gt;&lt;P&gt;[Total Units Received],&lt;/P&gt;&lt;P&gt;[Total Units Received]/[Units/Loco] as Final_Units&lt;/P&gt;&lt;P&gt;FROM [.../Test_Units_Table.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Test_Units);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TestTab:&lt;/P&gt;&lt;P&gt;Set i;&lt;/P&gt;&lt;P&gt;For i=1 to 50&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Loco_No_1 ,&lt;/P&gt;&lt;P&gt;[Total Units Received] as TestTab_UnitsReceived,&lt;/P&gt;&lt;P&gt;Final_Units as TestTab_Final_Units,&lt;/P&gt;&lt;P&gt;[Units/Loco] as TestTab_UnitsPerLoco,&lt;/P&gt;&lt;P&gt;if([Total Units Received]&amp;lt;=Final_Units,$(i),[Units/Loco]) as Values_Filled&lt;/P&gt;&lt;P&gt;Resident Test_Unit_Table;&lt;/P&gt;&lt;P&gt;Next i;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help me on this.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Mar 2018 11:36:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-03-06T11:36:41Z</dc:date>
    <item>
      <title>For loop in script for dynamic field(calculated on condition)</title>
      <link>https://community.qlik.com/t5/QlikView/For-loop-in-script-for-dynamic-field-calculated-on-condition/m-p/56663#M9455</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;&lt;/P&gt;&lt;P&gt;I want to generate a table like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="195438" alt="Capture.PNG" class="jive-image image-1" height="103" src="https://community.qlik.com/legacyfs/online/195438_Capture.PNG" style="height: 103px; width: 780.037px;" width="780" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loco number is autogenerated field (through Rowno() i made it in backend)&lt;/P&gt;&lt;P&gt;Green highlighted columns will be given,rest all need to be filled accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #003366; text-decoration: underline;"&gt;&lt;STRONG&gt;Logic is :&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Yellow highlighted columns i.e. Loco Numbers must be filled by the [Total Units Recieved]/[Units/Loco] value.&lt;/P&gt;&lt;P&gt;For eg. if Total units received is 20 and Units/loco is 4 then till 5 locos 1,2,3,4,5 it should be filled.Likewise for all row values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried by loop but i don't know where am i losing it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Code i wrote&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt; :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test_Unit_Table:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Rowno() as Loco_No_1,&lt;/P&gt;&lt;P&gt;[Units/Loco],&lt;/P&gt;&lt;P&gt;[Total Units Received],&lt;/P&gt;&lt;P&gt;[Total Units Received]/[Units/Loco] as Final_Units&lt;/P&gt;&lt;P&gt;FROM [.../Test_Units_Table.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Test_Units);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TestTab:&lt;/P&gt;&lt;P&gt;Set i;&lt;/P&gt;&lt;P&gt;For i=1 to 50&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Loco_No_1 ,&lt;/P&gt;&lt;P&gt;[Total Units Received] as TestTab_UnitsReceived,&lt;/P&gt;&lt;P&gt;Final_Units as TestTab_Final_Units,&lt;/P&gt;&lt;P&gt;[Units/Loco] as TestTab_UnitsPerLoco,&lt;/P&gt;&lt;P&gt;if([Total Units Received]&amp;lt;=Final_Units,$(i),[Units/Loco]) as Values_Filled&lt;/P&gt;&lt;P&gt;Resident Test_Unit_Table;&lt;/P&gt;&lt;P&gt;Next i;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help me on this.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2018 11:36:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/For-loop-in-script-for-dynamic-field-calculated-on-condition/m-p/56663#M9455</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-06T11:36:41Z</dc:date>
    </item>
  </channel>
</rss>

