<?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: Closing Stock Amount Calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Closing-Stock-Amount-Calculation/m-p/852311#M656895</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check attached qvw. Your calculated figure is wrong, it should be something like: 0.2054...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jun 2015 06:00:48 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2015-06-09T06:00:48Z</dc:date>
    <item>
      <title>Closing Stock Amount Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Closing-Stock-Amount-Calculation/m-p/852309#M656893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I have an issue in calculating closing stock amount.My requirement has been given in the attached application.Please follow the application and if you have any solution please share.I think it will calculated from the script end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thank You in advance.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Koushik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 05:34:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closing-Stock-Amount-Calculation/m-p/852309#M656893</guid>
      <dc:creator>koushik_btech20</dc:creator>
      <dc:date>2015-06-09T05:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Closing Stock Amount Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Closing-Stock-Amount-Calculation/m-p/852310#M656894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FirstSortedValue({$&amp;lt;[Reciept QTY]={'&amp;gt;0'}&amp;gt;} [Reciept QTY],-DATE)&lt;/P&gt;&lt;P&gt;/FirstSortedValue({$&amp;lt;[Reciept QTY]={'&amp;gt;0'}&amp;gt;} [Reciept Amount],-DATE)&lt;/P&gt;&lt;P&gt;*sum({&amp;lt;DATE={'$(=Max(DATE))'}&amp;gt;}[Closing Stock Qty])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And one note:&lt;/P&gt;&lt;P&gt;1195/191913.97*33=0.205.... instead your 5288.77&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards, Sergey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 05:48:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closing-Stock-Amount-Calculation/m-p/852310#M656894</guid>
      <dc:creator>pokassov</dc:creator>
      <dc:date>2015-06-09T05:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Closing Stock Amount Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Closing-Stock-Amount-Calculation/m-p/852311#M656895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check attached qvw. Your calculated figure is wrong, it should be something like: 0.2054...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 06:00:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closing-Stock-Amount-Calculation/m-p/852311#M656895</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-06-09T06:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Closing Stock Amount Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Closing-Stock-Amount-Calculation/m-p/852312#M656896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not working properly as per the requirement. &lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG style="font-size: 11.6999998092651px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/pokassov"&gt;pokassov&lt;/A&gt;‌'s &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;solution is working properly as per my previous requirement but I am posting the updated logic with attached application.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For any RecID,ITEM,Warehouse,Color, DimID combination if last row have QTY_StockIn value with &amp;gt;0&amp;nbsp; then that row will be considered otherwise any other previous row on behalf of the last row where&amp;nbsp; the QTY_StockIn value is &amp;gt;0 then that QTY_StockIn value and its corresponding&amp;nbsp; AMT_StockIn value should be considered to calculate the m_AMT_StockCL. And also apply the logic using RecordId because it is unique.Do not depend on the date as it cant be in a sorted manner but recordid corresponding to that date will always be unique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex:-&amp;nbsp; On belhalf of the attached Application,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="zz.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/89033_zz.jpg" style="height: 119px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;as per the example&lt;/P&gt;&lt;P&gt;Inventory Closing Qty:&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;1200&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here on the last record,&lt;/P&gt;&lt;P&gt;QTY_StockIn&amp;nbsp;&amp;nbsp;&amp;nbsp; = -1350&lt;/P&gt;&lt;P&gt;but we have to find in which last entry QTY_StockIn is &amp;gt;0,&lt;/P&gt;&lt;P&gt;So on the previous record, QTY_StockIn is 1350 then that record will be considered, but for that case we find &amp;gt;0 value for QTY_StockIN on last previous record and it is not static for all cases we can find anywhere the last &amp;gt;0 value QTY_StockIn, If Last record value have QTY_StockIn &amp;gt;0 then that record should be considered for taking IN QTY and Amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So The &lt;SPAN style="font-size: 13.3333330154419px;"&gt;m_AMT_StockCL= &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;[&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;107211.53&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;1350&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;*1200&lt;SPAN style="font-size: 13.3333330154419px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Inventory Closing Qty&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;)&lt;/SPAN&gt; =95299.14&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think implementing that logic inside script will be a great thing. Please check and if find any solution then share here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2015 06:18:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closing-Stock-Amount-Calculation/m-p/852312#M656896</guid>
      <dc:creator>koushik_btech20</dc:creator>
      <dc:date>2015-06-11T06:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Closing Stock Amount Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Closing-Stock-Amount-Calculation/m-p/852313#M656897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please help anyone I am waiting. Its very urgent.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2015 12:40:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Closing-Stock-Amount-Calculation/m-p/852313#M656897</guid>
      <dc:creator>koushik_btech20</dc:creator>
      <dc:date>2015-06-11T12:40:48Z</dc:date>
    </item>
  </channel>
</rss>

