<?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 in LOAD Script transforming table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loop-in-LOAD-Script-transforming-table/m-p/757961#M269760</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks a lot Anand an Rob. That really helped me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Jan 2015 21:21:25 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-01-08T21:21:25Z</dc:date>
    <item>
      <title>Loop in LOAD Script transforming table</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-in-LOAD-Script-transforming-table/m-p/757958#M269757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im a newbie to qlikview and could need some help. I`ve already learned a lot from in this forum but right now im facing a problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every week I get a table similar tot he example table. It contains for every ID all different duration_Types an the durtion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example Input:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="289"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="14" width="65"&gt;ID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="65"&gt;Date&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="94"&gt;Duration_Type&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="65"&gt;Duration&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="14" style="border-top: none;"&gt;103275&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;08.01.15&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;a&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0,15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="14" style="border-top: none;"&gt;103275&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;08.01.15&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;b&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2,3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="14" style="border-top: none;"&gt;103275&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;08.01.15&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;e&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0,78&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="14" style="border-top: none;"&gt;103275&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;09.01.15&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;a&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;5,1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="14" style="border-top: none;"&gt;103275&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;09.01.15&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;c&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;4,2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="14" style="border-top: none;"&gt;103275&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;09.01.15&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;d&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0,12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="14" style="border-top: none;"&gt;103275&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;10.01.15&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;a&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0,58&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="14" style="border-top: none;"&gt;103275&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;10.01.15&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;b&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2,75&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="14" style="border-top: none;"&gt;103275&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;10.01.15&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;c&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;1,3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="14" style="border-top: none;"&gt;103275&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;10.01.15&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;d&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0,54&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="14" style="border-top: none;"&gt;103275&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;10.01.15&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;e&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0,76&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to transform the table with a single record for every ID on a date and for every possible duration an own column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example Output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="432"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="14" width="65"&gt;ID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="65"&gt;Date&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="42"&gt;DT_a&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="65"&gt;DT_b&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="65"&gt;DT_c&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="65"&gt;DT_d&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="65"&gt;DT_e&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="14" style="border-top: none;"&gt;103275&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;08.01.15&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0,15&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2,3&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;-&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;-&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="14" style="border-top: none;"&gt;103275&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;09.01.15&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;5,1&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;-&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;4,2&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0,12&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="14" style="border-top: none;"&gt;103275&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;10.01.15&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0,58&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2,75&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;1,3&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0,54&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0,76&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I get every week a new input table with about 6000 records and 85 different duration types a hint for a loop-script would be fantastic. I’ve already tried a FOR NEXT loop and a left join looping through all the different dates, Id´s and Duration_Types, but it didn´t work. Learned a lot about loads loops variables......and at the end that this was the wrong approach Perhaps someone could offer me a hint how to solve this or a script fort he example data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 20:01:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-in-LOAD-Script-transforming-table/m-p/757958#M269757</guid>
      <dc:creator />
      <dc:date>2015-01-08T20:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Loop in LOAD Script transforming table</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-in-LOAD-Script-transforming-table/m-p/757959#M269758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do this with GENERIC LOAD. Roughly, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GENERIC LOAD&lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;'DT_' &amp;amp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Duration_Type, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Duration&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;RESIDENT ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;See &lt;A href="http://qlikviewcookbook.com/2010/05/use-cases-for-generic-load/" title="http://qlikviewcookbook.com/2010/05/use-cases-for-generic-load/"&gt;Use cases for Generic Load | Qlikview Cookbook&lt;/A&gt; for an example. The QV Ref Guide also has a good example in section 27.1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robwunderlich.com" rel="nofollow"&gt;http://robwunderlich.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 20:11:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-in-LOAD-Script-transforming-table/m-p/757959#M269758</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2015-01-08T20:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: Loop in LOAD Script transforming table</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-in-LOAD-Script-transforming-table/m-p/757960#M269759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this also i extend Robs Script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generic LOAD&lt;/P&gt;&lt;P&gt;ID, Date,&lt;/P&gt;&lt;P&gt;'DT_' &amp;amp; Duration_Type,&lt;/P&gt;&lt;P&gt;Duration&lt;/P&gt;&lt;P&gt;Resident Source;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Source;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generic LOAD&lt;/P&gt;&lt;P&gt;ID&amp;amp;'_'&amp;amp;Date,&lt;/P&gt;&lt;P&gt;'DT_' &amp;amp; Duration_Type,&lt;/P&gt;&lt;P&gt;Duration&lt;/P&gt;&lt;P&gt;Resident Source;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Source&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Output.PNG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/74883_Output.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 21:13:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-in-LOAD-Script-transforming-table/m-p/757960#M269759</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2015-01-08T21:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Loop in LOAD Script transforming table</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-in-LOAD-Script-transforming-table/m-p/757961#M269760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks a lot Anand an Rob. That really helped me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 21:21:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-in-LOAD-Script-transforming-table/m-p/757961#M269760</guid>
      <dc:creator />
      <dc:date>2015-01-08T21:21:25Z</dc:date>
    </item>
  </channel>
</rss>

