<?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: Using For Loop in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Using-For-Loop/m-p/1676653#M51437</link>
    <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Date is weekly based starting from 1/4/2016 to 12/26/2016 ,when first loop runs min date should be 1/4/2016 and max should be 1/11/2016&amp;nbsp; min and max values should be changing when loop runs and needs to be stored in a variable so i can use them for further calculations.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Feb 2020 13:16:44 GMT</pubDate>
    <dc:creator>sowmi</dc:creator>
    <dc:date>2020-02-18T13:16:44Z</dc:date>
    <item>
      <title>Using For Loop</title>
      <link>https://community.qlik.com/t5/App-Development/Using-For-Loop/m-p/1676388#M51415</link>
      <description>&lt;P&gt;Hi everyone ,&lt;/P&gt;&lt;P&gt;I'm using for loop when loop runs date variables should be updated here is the scrip i am using below script but variables are updated but in my min-max table it is only showing the first start two dates in my dates file i have dates like 1/2/16,1/9/16,1/16/16&lt;/P&gt;&lt;P&gt;Tmp:&lt;BR /&gt;Load Date from file1&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FOR i =1 to FieldValueCount('Date')-1&lt;/P&gt;&lt;P&gt;LET vDate_0 = Peek('Date', $(i),'Tmp');&lt;/P&gt;&lt;P&gt;LET vDate_1 = WeekStart(vDate_0+7);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Min_Max:&lt;BR /&gt;Load&lt;BR /&gt;Date( '$(vDate_1)') as Max_Date,&lt;BR /&gt;Date('$(vDate_0)') as Min_Date&lt;BR /&gt;Resident&amp;nbsp; Tmp;&lt;BR /&gt;NEXT i;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i run the loop i am excepting to see Max_Date as&amp;nbsp;1/16/16 and min date as 1/9/16.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thnxs&lt;/P&gt;&lt;P&gt;Sowmi&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:14:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-For-Loop/m-p/1676388#M51415</guid>
      <dc:creator>sowmi</dc:creator>
      <dc:date>2024-11-16T03:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using For Loop</title>
      <link>https://community.qlik.com/t5/App-Development/Using-For-Loop/m-p/1676613#M51428</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you provide us a sample data and expected result from it, then it will be more clear to write script.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 11:50:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-For-Loop/m-p/1676613#M51428</guid>
      <dc:creator>Prashant_Naik</dc:creator>
      <dc:date>2020-02-18T11:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using For Loop</title>
      <link>https://community.qlik.com/t5/App-Development/Using-For-Loop/m-p/1676653#M51437</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Date is weekly based starting from 1/4/2016 to 12/26/2016 ,when first loop runs min date should be 1/4/2016 and max should be 1/11/2016&amp;nbsp; min and max values should be changing when loop runs and needs to be stored in a variable so i can use them for further calculations.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 13:16:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-For-Loop/m-p/1676653#M51437</guid>
      <dc:creator>sowmi</dc:creator>
      <dc:date>2020-02-18T13:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using For Loop</title>
      <link>https://community.qlik.com/t5/App-Development/Using-For-Loop/m-p/1676683#M51441</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This might help&lt;/P&gt;&lt;P&gt;Tmp:&lt;BR /&gt;Load distinct Date from file1&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Let vNoofrows = NoOfrows ('Tmp');&lt;BR /&gt;FOR i =1 to $(vNoofrows)-1&lt;/P&gt;&lt;P&gt;LET vDate_0 = Peek('Date', $(i),'Tmp');&lt;/P&gt;&lt;P&gt;LET vDate_1 = WeekStart(vDate_0+7);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Min_Max:&lt;BR /&gt;Load&lt;/P&gt;&lt;P&gt;Date,&lt;BR /&gt;Date( '$(vDate_1)') as Max_Date,&lt;BR /&gt;Date('$(vDate_0)') as Min_Date&lt;BR /&gt;From file1 where Date = '$(vDate_0)';&lt;BR /&gt;NEXT i;&lt;/P&gt;&lt;P&gt;Drop table TMP;&lt;/P&gt;&lt;P&gt;This will loop so many times which will hit the performance.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 14:11:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-For-Loop/m-p/1676683#M51441</guid>
      <dc:creator>Prashant_Naik</dc:creator>
      <dc:date>2020-02-18T14:11:07Z</dc:date>
    </item>
  </channel>
</rss>

