<?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: Loop statements in Qlikview in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loop-statements-in-Qlikview/m-p/2105741#M1224387</link>
    <description>&lt;P&gt;Thank you, the left join was a great idea and seems to have done the trick.&amp;nbsp; I just did some clean up on your idea by using my logic, that is , if using your concept of an inline load, I built my inline table with only the RollUpID, then the left join in the for/next statement did the rest of the work of counting per RollUpID.&lt;/P&gt;</description>
    <pubDate>Mon, 14 Aug 2023 21:55:22 GMT</pubDate>
    <dc:creator>kdmarkee221</dc:creator>
    <dc:date>2023-08-14T21:55:22Z</dc:date>
    <item>
      <title>Loop statements in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-statements-in-Qlikview/m-p/2105652#M1224385</link>
      <description>&lt;P&gt;I'm struggling with loops in my script.&amp;nbsp; Thanks for your help.&lt;/P&gt;
&lt;P&gt;How do I loop through my CrostableWork_temp02 (which is an odd but correct table) table below 60 times&amp;nbsp;(as represented by variable t$) but end up with a single table when it is done?&lt;/P&gt;
&lt;P&gt;LOAD&lt;BR /&gt;RollUp_ID,&lt;BR /&gt;Count(MinuteColName) as [Times with $(t)]&lt;BR /&gt;Resident CrostableWork_temp02&lt;BR /&gt;Where Match(MinuteColValue, $(t))&lt;BR /&gt;Group by RollUp_ID&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So a sample from&amp;nbsp;CrostableWork_temp02 might be:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kdmarkee221_0-1692032777384.png" style="width: 210px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/114400i2649BF7BB08CADB0/image-dimensions/210x105?v=v2" width="210" height="105" role="button" title="kdmarkee221_0-1692032777384.png" alt="kdmarkee221_0-1692032777384.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Which I want it to produce this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kdmarkee221_1-1692032820894.png" style="width: 436px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/114401i668265AC1619516F/image-dimensions/436x61?v=v2" width="436" height="61" role="button" title="kdmarkee221_1-1692032820894.png" alt="kdmarkee221_1-1692032820894.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 17:08:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-statements-in-Qlikview/m-p/2105652#M1224385</guid>
      <dc:creator>kdmarkee221</dc:creator>
      <dc:date>2023-08-14T17:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Loop statements in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-statements-in-Qlikview/m-p/2105697#M1224386</link>
      <description>&lt;P&gt;try this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;data:
load * inline [
RollID, ColNameCount, ColValue
1, 2, 1
1, 3, 2
2, 1, 4
3,2,5
];


for i=1 to 5
	left join (data)
    load RollID, ColNameCount as [Times with $(i)]
    Resident data
    where ColValue=$(i);
next i&lt;/LI-CODE&gt;
&lt;P&gt;which is a shortcut once youve aggreagated the counts.&amp;nbsp; here is the result:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="edwin_0-1692038056486.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/114402i50D442DB36DBA12A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="edwin_0-1692038056486.png" alt="edwin_0-1692038056486.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 18:34:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-statements-in-Qlikview/m-p/2105697#M1224386</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2023-08-14T18:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Loop statements in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-statements-in-Qlikview/m-p/2105741#M1224387</link>
      <description>&lt;P&gt;Thank you, the left join was a great idea and seems to have done the trick.&amp;nbsp; I just did some clean up on your idea by using my logic, that is , if using your concept of an inline load, I built my inline table with only the RollUpID, then the left join in the for/next statement did the rest of the work of counting per RollUpID.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 21:55:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-statements-in-Qlikview/m-p/2105741#M1224387</guid>
      <dc:creator>kdmarkee221</dc:creator>
      <dc:date>2023-08-14T21:55:22Z</dc:date>
    </item>
  </channel>
</rss>

