<?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 Stock Aging cost calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Stock-Aging-cost-calculation/m-p/281159#M104587</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To whom can help me,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to calculate a cost for stock that ages dynamically depending on the period selected. I have attached an example qv file to work with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know what I want to do, just not quite sure how to do it in QV. Here is the data and an example of how it should be calculated:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if period 201112 is selected then the calculation is as follows:&lt;/P&gt;&lt;P&gt;Quantity on hand is 118&lt;/P&gt;&lt;P&gt;So it start latest first i.e. 53*1206.28=63932.84&lt;/P&gt;&lt;P&gt;then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2*39.82=79.64&lt;/P&gt;&lt;P&gt;then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4*19.91=79.64&lt;/P&gt;&lt;P&gt;then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20*13.05=261&lt;/P&gt;&lt;P&gt;then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10*12.50=125&lt;/P&gt;&lt;P&gt;then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10*12.05=120.50 (Although the quantity is 90, the remainder is 10, therefore that is the final outstanding qty for the calc)&lt;/P&gt;&lt;P&gt;total cost is 64598.62&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If period 201112 is selected then the same calc must be perfomed dynamically which normally yields a different result(as you select older periods the cost changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The report n the QV file has a report where the current cost of 118*700 = 82600&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the difference between the current cost and aged cost is 82600-64598.62=18001.38&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope i have explained the situation clearly enough to help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks&lt;/P&gt;&lt;P&gt;Gary&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Feb 2012 13:27:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-02-14T13:27:52Z</dc:date>
    <item>
      <title>Stock Aging cost calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Stock-Aging-cost-calculation/m-p/281159#M104587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To whom can help me,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to calculate a cost for stock that ages dynamically depending on the period selected. I have attached an example qv file to work with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know what I want to do, just not quite sure how to do it in QV. Here is the data and an example of how it should be calculated:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if period 201112 is selected then the calculation is as follows:&lt;/P&gt;&lt;P&gt;Quantity on hand is 118&lt;/P&gt;&lt;P&gt;So it start latest first i.e. 53*1206.28=63932.84&lt;/P&gt;&lt;P&gt;then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2*39.82=79.64&lt;/P&gt;&lt;P&gt;then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4*19.91=79.64&lt;/P&gt;&lt;P&gt;then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20*13.05=261&lt;/P&gt;&lt;P&gt;then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10*12.50=125&lt;/P&gt;&lt;P&gt;then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10*12.05=120.50 (Although the quantity is 90, the remainder is 10, therefore that is the final outstanding qty for the calc)&lt;/P&gt;&lt;P&gt;total cost is 64598.62&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If period 201112 is selected then the same calc must be perfomed dynamically which normally yields a different result(as you select older periods the cost changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The report n the QV file has a report where the current cost of 118*700 = 82600&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the difference between the current cost and aged cost is 82600-64598.62=18001.38&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope i have explained the situation clearly enough to help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks&lt;/P&gt;&lt;P&gt;Gary&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 13:27:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stock-Aging-cost-calculation/m-p/281159#M104587</guid>
      <dc:creator />
      <dc:date>2012-02-14T13:27:52Z</dc:date>
    </item>
  </channel>
</rss>

