<?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: for loop load issue in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233672#M2394</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are there any selections applied? Have you tried to load this qvd in a new empty application?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Dec 2016 16:35:30 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2016-12-09T16:35:30Z</dc:date>
    <item>
      <title>for loop load issue</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233663#M2385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following code where I am trying to fetch id &amp;amp; dcode from a list and for each value run a load statement to a qvd. My problem is that my data has multiple dcodes for each id and even thought hlist contains these combinations, my qvd shows only 1 dcocde corrosponding to each ID. Can some one please explain why? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14812366084343774" jivemacro_uid="_14812366084343774" modifiedtitle="true"&gt;
&lt;P&gt;[hlist]:&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID, dcode&lt;/P&gt;
&lt;P&gt;where CNT &amp;gt; 11;&lt;/P&gt;
&lt;P&gt;//Identify all id, dcode combinations where count of records is &amp;gt; 11&lt;/P&gt;
&lt;P&gt;SQL&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dcode,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CNT,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RANK&lt;/P&gt;
&lt;P&gt;FROM Tbl.`d_RANK`;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LET vhpCount = NoOfRows('hlist');&lt;/P&gt;
&lt;P&gt;// Loop the dimensional information for each of the above hospital- DRG combination &lt;/P&gt;
&lt;P&gt;// where the number of cases is more than 10&lt;/P&gt;
&lt;P&gt;For j = 1 to vhpCount &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vid= FieldValue('ID',j);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vd_code = FieldValue('dcode',j);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [d_code_Agg]:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD&amp;nbsp; ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dcode , &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zip,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; APPLYMAP('v_SEX',SEX,'NA') AS SEX,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; APPLYMAP('v_RACE',RACE,'NA') AS RACE,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; APPLYMAP('v_DISP',DISP,'NA') AS DISP,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; APPLYMAP('v_FC',FC,'NA') AS FC,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; APPLYMAP('v_ETHNIC',ETHNIC,'NA') AS ETHNIC,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; num_cases;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; // WHERE num_cases &amp;gt; 5;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select&amp;nbsp; ID, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DRG , &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zip,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SEX, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RACE,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DISP,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FC,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETHNIC,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; count(*) as num_cases&lt;/P&gt;
&lt;P&gt;&amp;nbsp; from Tbl.main_data&lt;/P&gt;
&lt;P&gt;&amp;nbsp; where ID&amp;nbsp;&amp;nbsp;&amp;nbsp; = '$(vid)'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; and dcode = '$(vd_code)'&lt;/P&gt;
&lt;P&gt;&amp;nbsp; group by ID,dcode, zip,SEX, RACE,DISP,FC, ETHNIC;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; STORE d_code_Agg INTO 'lib://tname/sample_agg.qvd' ; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;NEXT j;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what the tables look like&lt;/P&gt;&lt;P&gt;hlist&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="149" style="border: 1px solid rgb(0, 0, 0); width: 165px; height: 74px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;dcode&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;h1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;d1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;h1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;d2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;h1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;d3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;h2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;d7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;h2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;d2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where as the qvd sample_agg has the following set &lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="149" style="border: 1px solid rgb(0, 0, 0); width: 184px; height: 108px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;ID&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;dcode&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;h1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;d1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;h2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;d2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;h2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;d3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;Tbl.main_data&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2016 22:43:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233663#M2385</guid>
      <dc:creator />
      <dc:date>2016-12-08T22:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: for loop load issue</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233664#M2386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are two things noticeable. The first is a DISTINCT which might needed to prevent multiple record per ID and dcode whereby it seems not necessary in your case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[hlist]:&amp;nbsp; &lt;/P&gt;&lt;P&gt;LOAD &lt;STRONG&gt;DISTINCT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other point is the place of your store-statement which stored the table by each iteration in the same file and this table increased by each iteration per auto-concatenation without dropping the previous loaded table. If you want a separate qvd for each iteration you should add your variables within the filename and then dropping the table or place the store-statement just after the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I'm not sure if both points touch your described abnormalities. For this I would run this within the debugger to see how many iterations happens and how your variables look like by them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 09:41:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233664#M2386</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-12-09T09:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: for loop load issue</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233665#M2387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Your code is incorrect, it should show an error while loading, there in no dcode in SQL Select Statement.&lt;/P&gt;&lt;P&gt;2. Write store statement outside of loop.&lt;/P&gt;&lt;P&gt;3. Looks like you are trying to calculate number of cases for every unique combination of ID,dcode,zip,SEX, RACE,DISP,FC, ETHNIC. You don't need a loop for that. Just use exists function to filter records if hlist contains less unique combinations of ID and dcode.&lt;/P&gt;&lt;P&gt;4. Fetching data from any SQL source again and again in a loop is not a best practice, just fetch data once and use Resident.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 10:21:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233665#M2387</guid>
      <dc:creator>shubham_singh</dc:creator>
      <dc:date>2016-12-09T10:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: for loop load issue</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233666#M2388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marcus, I used the debugger mode. Both the loops are working correctly. Outer loop selects a value of id and dcode and then the inner loop used that value to load the count for unique combination of various dimensions. But when I see the results, I always see only one dcode corresponding to each ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I want the results for each ID, dcode combination combined in a single qvd.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 15:36:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233666#M2388</guid>
      <dc:creator />
      <dc:date>2016-12-09T15:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: for loop load issue</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233667#M2389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shubham, If the store statement is outside the loop, it will pick just the last value of ID, dcode and store in the qvd. I am not sure, how I can use RESIDENT load here. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 15:38:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233667#M2389</guid>
      <dc:creator />
      <dc:date>2016-12-09T15:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: for loop load issue</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233668#M2390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your loop should have taken 5 iterations - was there 5 times an increasing of records within your table? Take a look within the log-file or run the script again. And aren't there each time more records it meant that not all combinations of ID and dcode are within your main_data-table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 16:05:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233668#M2390</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-12-09T16:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: for loop load issue</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233669#M2391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; color: #1f497d;"&gt;Yes, That’s exactly what I am seeing. I get 17 combinations of ID and dcode (which are based on a query on the maintable, so there are no cases which will not exists). Then for loop runs 17 times, each time loading a different number of records. My final count also matches the SQL query but when I create the dashboard, I see only 1 dcode for each ID. My guess is that I am missing something about qvd storage here or the fact that, the store statement is being over written. But then, the matching final count is perplexing me. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; color: #1f497d;"&gt;-Akshata&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 16:17:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233669#M2391</guid>
      <dc:creator />
      <dc:date>2016-12-09T16:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: for loop load issue</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233670#M2392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you check your final data - with listboxes or both fields with a tablebox?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 16:20:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233670#M2392</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-12-09T16:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: for loop load issue</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233671#M2393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;both fields with a tablebox&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 16:23:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233671#M2393</guid>
      <dc:creator />
      <dc:date>2016-12-09T16:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: for loop load issue</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233672#M2394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are there any selections applied? Have you tried to load this qvd in a new empty application?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 16:35:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233672#M2394</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-12-09T16:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: for loop load issue</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233673#M2395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I checked for selections, I tried loading into a new file as well. &lt;/P&gt;&lt;P&gt;If name.qvd is already present at the path then is the data appended to it or overwritten? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 16:37:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233673#M2395</guid>
      <dc:creator />
      <dc:date>2016-12-09T16:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: for loop load issue</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233674#M2396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A qvd will be always overwritten but even if your store is within the loop (better would be outside) you should get all records because of the autoconcatenation from loadings which have the same data-structure. But maybe it's useful to force these concatenation with a statement like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;LET vd_code = FieldValue(&lt;SPAN class="string"&gt;'dcode',j);&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;let vConcat = if(noofrows('d_code_Agg') = 0, '[d_code_Agg]:', 'concatenate([d_code_Agg])');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//[d_code_Agg]:&amp;nbsp; &lt;/P&gt;&lt;P&gt;$(vConcat)&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; ID,&amp;nbsp; &lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 16:45:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233674#M2396</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-12-09T16:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: for loop load issue</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233675#M2397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Placing store statement outside loop will not give you last value, tables of same structure gets auto concatenated to existing table so you will have all data in single table after loop end and you can store that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I am guessing you don't need loop to perform your desired task.&lt;/P&gt;&lt;P&gt;Let me know your desired output and some sample data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Dec 2016 07:21:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233675#M2397</guid>
      <dc:creator>shubham_singh</dc:creator>
      <dc:date>2016-12-10T07:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: for loop load issue</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233676#M2398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have figured, what is happening. The first file 'hlist' stores hid and dcode as list of unique values. So when I use the loop, the 10th value for dcode is not the dcode corresponding to 10th hid but the 10th unique value, which is driving me crazy!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 20:38:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233676#M2398</guid>
      <dc:creator />
      <dc:date>2016-12-12T20:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: for loop load issue</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233677#M2399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/230617"&gt;shubham.singh&lt;/A&gt;‌ I want to load the data in &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;Tbl.main_data for each value obtained in hlist. So for id =h1 and dcode = d1 I have to fetch the records, then for h1 and d2&amp;nbsp; combination and so on. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 21:20:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233677#M2399</guid>
      <dc:creator />
      <dc:date>2016-12-12T21:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: for loop load issue</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233678#M2400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to loop through the hlist-table and not through the fieldvalues which are always a distinctlist of fieldvalues. This could be done per &lt;A href="https://community.qlik.com/docs/DOC-9314"&gt;Peek() or Previous() ?&lt;/A&gt; for in your case for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;LET vhpCount = NoOfRows('hlist');&amp;nbsp; &lt;/P&gt;&lt;P&gt;For j = 1 to vhpCount&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vid= peek('ID', j, 'hlist');&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vd_code = &lt;STRONG&gt;peek('dcode', j, 'hlist')&lt;/STRONG&gt;;&amp;nbsp; &lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 05:38:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233678#M2400</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-12-13T05:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: for loop load issue</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233679#M2401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That indeed was my problem. Thank you for your time&amp;nbsp; &lt;A href="https://community.qlik.com/qlik-users/27943"&gt;marcus_sommer&lt;/A&gt;&lt;A href="https://community.qlik.com/qlik-users/230617"&gt;shubham.singh&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 14:17:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/for-loop-load-issue/m-p/1233679#M2401</guid>
      <dc:creator />
      <dc:date>2016-12-13T14:17:28Z</dc:date>
    </item>
  </channel>
</rss>

