<?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: If then loop in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-then-loop/m-p/1168965#M1314699</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't really understand your requested output description:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Are you only considering records looking back to the last sale as 'recent'? Or why have you left out 1-Jan and 1-Feb receipts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-"&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;for eg. in the output for item RBC 12300, GRN Qty is 30, but only 20 is considered as the sum total is equal to 60."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am totally lost, can't get how you calculate 30, then consider only 20????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Jun 2016 22:00:11 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-06-10T22:00:11Z</dc:date>
    <item>
      <title>If then loop</title>
      <link>https://community.qlik.com/t5/QlikView/If-then-loop/m-p/1168964#M1314698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 396px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="64"&gt;Date&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="70"&gt;Entry type&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="70"&gt;Item&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Qty&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;GRN no.&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Vendor&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;1-Jan-16&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;GRN&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;RBC12300&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;GRN-101&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;ABC&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;3-Jan-16&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Sale&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;RBC12300&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;-20&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;SRN-678&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;DEF&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;4-Jan-16&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;GRN&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;RBC12300&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;GRN-102&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;CDE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;5-Jan-16&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Output&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;RBC12300&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;25&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;ORN-345&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;RC!&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;6-Jan-16&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;GRN&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;RBC12300&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;15&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;GRN-103&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;ABC&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;1-Feb-16&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;GRN&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;RAC56789&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;GRN-101&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;ABC&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;3-Feb-16&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Sale&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;RAC56789&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;-20&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;SRN-678&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;DEF&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;4-Feb-16&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;GRN&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;RAC56789&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;GRN-102&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;CDE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;5-Feb-16&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Output&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;RAC56789&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;35&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;ORN-345&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;RC!&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;6-Feb-16&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;GRN&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;RAC56789&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;15&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;GRN-103&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;ABC&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;Table 2:&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="262"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" colspan="3" height="20" width="198"&gt;Closing stock of RBC 12300&lt;/TD&gt;&lt;TD align="right" width="64"&gt;60&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" colspan="3" height="20"&gt;Closing stock of RBC 12300&lt;/TD&gt;&lt;TD align="right"&gt;70&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;i need the following output :&lt;/P&gt;&lt;P&gt;The system should compare recent Receipts (GRN and Output)&lt;/P&gt;&lt;P&gt; with the closing stock. to the extent Receipts matches with the closing stock, it should consider.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="332"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" width="70"&gt;6-Jan-16&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="70"&gt;GRN&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;RBC12300&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;GRN-103&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-left: none;" width="64"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;5-Jan-16&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Output&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;RBC12300&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;ORN-345&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;4-Jan-16&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;GRN&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;RBC12300&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;GRN-102&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;6-Feb-16&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;GRN&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;RAC56789&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;GRN-103&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;5-Feb-16&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Output&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;RAC56789&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;ORN-345&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;4-Feb-16&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;GRN&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;RAC56789&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;GRN-102&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for eg. in the output for item RBC 12300, GRN Qty is 30, but only 20 is considered as the sum total is equal to 60.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kindly provide code for this in qlikview/&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-then-loop/m-p/1168964#M1314698</guid>
      <dc:creator />
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: If then loop</title>
      <link>https://community.qlik.com/t5/QlikView/If-then-loop/m-p/1168965#M1314699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't really understand your requested output description:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Are you only considering records looking back to the last sale as 'recent'? Or why have you left out 1-Jan and 1-Feb receipts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-"&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;for eg. in the output for item RBC 12300, GRN Qty is 30, but only 20 is considered as the sum total is equal to 60."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am totally lost, can't get how you calculate 30, then consider only 20????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2016 22:00:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-then-loop/m-p/1168965#M1314699</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-10T22:00:11Z</dc:date>
    </item>
  </channel>
</rss>

