<?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 Iteration for Selected Rows Only in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Iteration-for-Selected-Rows-Only/m-p/1819944#M1213369</link>
    <description>&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;I have a situation where I am loading in records where each row has an individual material name, and a weight for that material, plus some other fields such as date and time.&lt;/P&gt;&lt;P&gt;But a selected number of these materials are in fact made up of components, where the weight of the component is a known percentage of the original material. There are four components that make up each selected material, for example Component 1 is 0.5*the weight of the material, Components 2 and 3 are 0.2*the weight of the material, and Component 4 is 0.1*the weight of the material.&lt;/P&gt;&lt;P&gt;I want to be able to iterate these particular records so that whenever the selected material is encountered, that record is loaded 4 times, with each iteration causing the weight to be down-rated by the specified amount, and the Component registered as the material name.&lt;/P&gt;&lt;P&gt;But for all other materials, I just want the record loaded once.&lt;/P&gt;&lt;P&gt;I thought I might be able to use iterno() and a while statement, but I can't see how to reset iterno() dependent on material name.&lt;/P&gt;&lt;P&gt;Does anyone know of a technique I might use to achieve what I want?&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Pete&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jul 2021 02:18:31 GMT</pubDate>
    <dc:creator>peter_burgess</dc:creator>
    <dc:date>2021-07-06T02:18:31Z</dc:date>
    <item>
      <title>Iteration for Selected Rows Only</title>
      <link>https://community.qlik.com/t5/QlikView/Iteration-for-Selected-Rows-Only/m-p/1819944#M1213369</link>
      <description>&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;I have a situation where I am loading in records where each row has an individual material name, and a weight for that material, plus some other fields such as date and time.&lt;/P&gt;&lt;P&gt;But a selected number of these materials are in fact made up of components, where the weight of the component is a known percentage of the original material. There are four components that make up each selected material, for example Component 1 is 0.5*the weight of the material, Components 2 and 3 are 0.2*the weight of the material, and Component 4 is 0.1*the weight of the material.&lt;/P&gt;&lt;P&gt;I want to be able to iterate these particular records so that whenever the selected material is encountered, that record is loaded 4 times, with each iteration causing the weight to be down-rated by the specified amount, and the Component registered as the material name.&lt;/P&gt;&lt;P&gt;But for all other materials, I just want the record loaded once.&lt;/P&gt;&lt;P&gt;I thought I might be able to use iterno() and a while statement, but I can't see how to reset iterno() dependent on material name.&lt;/P&gt;&lt;P&gt;Does anyone know of a technique I might use to achieve what I want?&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Pete&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 02:18:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Iteration-for-Selected-Rows-Only/m-p/1819944#M1213369</guid>
      <dc:creator>peter_burgess</dc:creator>
      <dc:date>2021-07-06T02:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Iteration for Selected Rows Only</title>
      <link>https://community.qlik.com/t5/QlikView/Iteration-for-Selected-Rows-Only/m-p/1819946#M1213370</link>
      <description>&lt;P&gt;you need to use loops to do this , could you please share the sample data to work on&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 03:32:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Iteration-for-Selected-Rows-Only/m-p/1819946#M1213370</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2021-07-06T03:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Iteration for Selected Rows Only</title>
      <link>https://community.qlik.com/t5/QlikView/Iteration-for-Selected-Rows-Only/m-p/1819949#M1213372</link>
      <description>&lt;P&gt;Attached is a very simplified working example .&lt;/P&gt;&lt;P&gt;Table A is the table to be read / loaded by the script.&lt;/P&gt;&lt;P&gt;The component breakdown of the two PVC compounds is on the right, in percentage units.&lt;/P&gt;&lt;P&gt;The output required, i.e. the table that will exist in the QV document after loading, is given as Table B.&lt;/P&gt;&lt;P&gt;Hope this is understandable.&lt;/P&gt;&lt;P&gt;Pete&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 04:05:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Iteration-for-Selected-Rows-Only/m-p/1819949#M1213372</guid>
      <dc:creator>peter_burgess</dc:creator>
      <dc:date>2021-07-06T04:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Iteration for Selected Rows Only</title>
      <link>https://community.qlik.com/t5/QlikView/Iteration-for-Selected-Rows-Only/m-p/1819984#M1213377</link>
      <description>&lt;P&gt;Please find the solution below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="avinashelite_0-1625556711010.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/58068i70E8AE3E6B9065A7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="avinashelite_0-1625556711010.png" alt="avinashelite_0-1625556711010.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Table_A:&lt;BR /&gt;LOAD * Inline&lt;BR /&gt;[&lt;BR /&gt;Material,Date,Weight&lt;BR /&gt;PVC-One,08/08/2021,200&lt;BR /&gt;PVC-Two,15/08/2021,200&lt;BR /&gt;HDPE,22/08/2021,80&lt;BR /&gt;LLDPE,29/08/2021,76&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Left Join(Table_A)&lt;/P&gt;&lt;P&gt;Component_PVC:&lt;BR /&gt;LOAD * Inline&lt;BR /&gt;[&lt;BR /&gt;Material,Component,Percent&lt;BR /&gt;PVC-One,Resin,40&lt;BR /&gt;PVC-One,Plasticiser,30&lt;BR /&gt;PVC-One,Filler,20&lt;BR /&gt;PVC-One,Stabiliser,10&lt;BR /&gt;PVC-Two,Resin,30&lt;BR /&gt;PVC-Two,Plasticiser,30&lt;BR /&gt;PVC-Two,Filler,30&lt;BR /&gt;PVC-Two,Stabiliser,10&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Final:&lt;BR /&gt;LOAD&lt;BR /&gt;Date,&lt;BR /&gt;If(len(trim(Component))=0,Material,Component) as Material,&lt;BR /&gt;Material as Material_Orginal,&lt;BR /&gt;If(len(trim(Component))=0,Weight,(Weight*Percent)/100) as Weight,&lt;BR /&gt;Weight as Weight_Orginal&lt;BR /&gt;Resident&lt;BR /&gt;Table_A;&lt;/P&gt;&lt;P&gt;DROP Table Table_A;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 07:32:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Iteration-for-Selected-Rows-Only/m-p/1819984#M1213377</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2021-07-06T07:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Iteration for Selected Rows Only</title>
      <link>https://community.qlik.com/t5/QlikView/Iteration-for-Selected-Rows-Only/m-p/1820011#M1213380</link>
      <description>&lt;P&gt;Thank you avinashelite, the correct approach is now clear to me. I had never even considered joining the component tables, although it seems obvious now. I was fixated on a one shot approach that would have been vey difficult to understand, with many if statements. I appreciate your putting me on the right path.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Pete&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 08:57:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Iteration-for-Selected-Rows-Only/m-p/1820011#M1213380</guid>
      <dc:creator>peter_burgess</dc:creator>
      <dc:date>2021-07-06T08:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Iteration for Selected Rows Only</title>
      <link>https://community.qlik.com/t5/QlikView/Iteration-for-Selected-Rows-Only/m-p/1820037#M1213384</link>
      <description>&lt;P&gt;Thank you !!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 09:51:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Iteration-for-Selected-Rows-Only/m-p/1820037#M1213384</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2021-07-06T09:51:29Z</dc:date>
    </item>
  </channel>
</rss>

