<?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 I have a problem with the calculation, in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/I-have-a-problem-with-the-calculation/m-p/539219#M201494</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;I am calculating DaysOfSupply for the following database in which i have data table as Follows:&lt;IMG alt="Untitled.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/50940_Untitled.png" style="width: 620px; height: 379px;" /&gt;&lt;/P&gt;&lt;P&gt;For Days of supply Calculation I need to track on the productId ,LocationId and next days forecast Stock,&lt;/P&gt;&lt;P&gt;Like for ProductId 1 and LocationId 1 ,projectedStock for 1/1/2013 is 2861 now this projected stock need to compare with next days forecast stock which is of 2/1/2013 is 4901&lt;/P&gt;&lt;P&gt;Rule (a)so here my projectedstock&amp;lt;nextdaysForecastStock so ProjectedStock/nextdaysForecastStock&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly next case will arrive if projectedstock&amp;gt;=nextdaysForecastStock&lt;/P&gt;&lt;P&gt;then the steps involved is:&lt;/P&gt;&lt;P&gt;1) Calculate the difference between projectedstock-nextdaysForecastStock as StockDiff and set counter as 1again this StockDiff &lt;/P&gt;&lt;P&gt;will be compared by twodaysAfterForecastStock .&lt;/P&gt;&lt;P&gt;2)if StockDiff &amp;gt;=twodaysAfterForecastStock then follow step 1 again and increase the counter by 1 again every time in the loop the StockDiff act as projectedStock and (n)daysAfterForecastStock act as nextdaysForecastStock ,&lt;/P&gt;&lt;P&gt;3)else if StockDiff &amp;lt;(n)daysAfterForecastStock then (a) Rule will followed and the last got counter will be added with this ProjectedStock/nextdaysForecastStock quantity and the counter will be taken as DaysOfSupply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can this be done, I am attaching my file in which i am working&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Dec 2013 07:46:05 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-12-31T07:46:05Z</dc:date>
    <item>
      <title>I have a problem with the calculation,</title>
      <link>https://community.qlik.com/t5/QlikView/I-have-a-problem-with-the-calculation/m-p/539219#M201494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;I am calculating DaysOfSupply for the following database in which i have data table as Follows:&lt;IMG alt="Untitled.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/50940_Untitled.png" style="width: 620px; height: 379px;" /&gt;&lt;/P&gt;&lt;P&gt;For Days of supply Calculation I need to track on the productId ,LocationId and next days forecast Stock,&lt;/P&gt;&lt;P&gt;Like for ProductId 1 and LocationId 1 ,projectedStock for 1/1/2013 is 2861 now this projected stock need to compare with next days forecast stock which is of 2/1/2013 is 4901&lt;/P&gt;&lt;P&gt;Rule (a)so here my projectedstock&amp;lt;nextdaysForecastStock so ProjectedStock/nextdaysForecastStock&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly next case will arrive if projectedstock&amp;gt;=nextdaysForecastStock&lt;/P&gt;&lt;P&gt;then the steps involved is:&lt;/P&gt;&lt;P&gt;1) Calculate the difference between projectedstock-nextdaysForecastStock as StockDiff and set counter as 1again this StockDiff &lt;/P&gt;&lt;P&gt;will be compared by twodaysAfterForecastStock .&lt;/P&gt;&lt;P&gt;2)if StockDiff &amp;gt;=twodaysAfterForecastStock then follow step 1 again and increase the counter by 1 again every time in the loop the StockDiff act as projectedStock and (n)daysAfterForecastStock act as nextdaysForecastStock ,&lt;/P&gt;&lt;P&gt;3)else if StockDiff &amp;lt;(n)daysAfterForecastStock then (a) Rule will followed and the last got counter will be added with this ProjectedStock/nextdaysForecastStock quantity and the counter will be taken as DaysOfSupply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can this be done, I am attaching my file in which i am working&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Dec 2013 07:46:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/I-have-a-problem-with-the-calculation/m-p/539219#M201494</guid>
      <dc:creator />
      <dc:date>2013-12-31T07:46:05Z</dc:date>
    </item>
  </channel>
</rss>

