<?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 Need to break down a column into rows with iterative script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-to-break-down-a-column-into-rows-with-iterative-script/m-p/1915752#M1218334</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have the following data in my data model:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yashcena_0-1649324882730.png" style="width: 573px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/76567iE1A04D61B85A0F63/image-dimensions/573x410?v=v2" width="573" height="410" role="button" title="yashcena_0-1649324882730.png" alt="yashcena_0-1649324882730.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I need to break up the ORDERED_PRODUCTS column into rows like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yashcena_1-1649324925695.png" style="width: 569px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/76568iD50F4119111B7482/image-dimensions/569x124?v=v2" width="569" height="124" role="button" title="yashcena_1-1649324925695.png" alt="yashcena_1-1649324925695.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I can use subfield function to extract each of&amp;nbsp; "RecurringDue", "ProdQuantity", "ProdName", "ProdDesc" etc.&lt;BR /&gt;&lt;BR /&gt;But the problem is 1st ID has 3 products, 2nd ID has 2 products and 3rd ID has 4 products. I'm not able to figure out how to write the script so that it first checks how many {.....}, {......}, {.....} are there in each row and then use "subfield" that many times.&lt;BR /&gt;&lt;BR /&gt;So for 1st row, we have three {....} - need to use subfield 3 times&lt;BR /&gt;2nd row, we have two {...} - need to use subfield 2 times....so on and so forth.&lt;BR /&gt;&lt;BR /&gt;Any help would be greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Apr 2022 09:54:36 GMT</pubDate>
    <dc:creator>yashcena</dc:creator>
    <dc:date>2022-04-07T09:54:36Z</dc:date>
    <item>
      <title>Need to break down a column into rows with iterative script</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-break-down-a-column-into-rows-with-iterative-script/m-p/1915752#M1218334</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have the following data in my data model:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yashcena_0-1649324882730.png" style="width: 573px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/76567iE1A04D61B85A0F63/image-dimensions/573x410?v=v2" width="573" height="410" role="button" title="yashcena_0-1649324882730.png" alt="yashcena_0-1649324882730.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I need to break up the ORDERED_PRODUCTS column into rows like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yashcena_1-1649324925695.png" style="width: 569px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/76568iD50F4119111B7482/image-dimensions/569x124?v=v2" width="569" height="124" role="button" title="yashcena_1-1649324925695.png" alt="yashcena_1-1649324925695.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I can use subfield function to extract each of&amp;nbsp; "RecurringDue", "ProdQuantity", "ProdName", "ProdDesc" etc.&lt;BR /&gt;&lt;BR /&gt;But the problem is 1st ID has 3 products, 2nd ID has 2 products and 3rd ID has 4 products. I'm not able to figure out how to write the script so that it first checks how many {.....}, {......}, {.....} are there in each row and then use "subfield" that many times.&lt;BR /&gt;&lt;BR /&gt;So for 1st row, we have three {....} - need to use subfield 3 times&lt;BR /&gt;2nd row, we have two {...} - need to use subfield 2 times....so on and so forth.&lt;BR /&gt;&lt;BR /&gt;Any help would be greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 09:54:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-break-down-a-column-into-rows-with-iterative-script/m-p/1915752#M1218334</guid>
      <dc:creator>yashcena</dc:creator>
      <dc:date>2022-04-07T09:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need to break down a column into rows with iterative script</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-break-down-a-column-into-rows-with-iterative-script/m-p/1915832#M1218338</link>
      <description>&lt;P&gt;You don't need to know how many parts are there. You could use subfield() just with two parameters and it will creates all appropriate records.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 12:47:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-break-down-a-column-into-rows-with-iterative-script/m-p/1915832#M1218338</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-04-07T12:47:40Z</dc:date>
    </item>
  </channel>
</rss>

