<?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 Coverage of Supplies with respect to Stock and Demand in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Coverage-of-Supplies-with-respect-to-Stock-and-Demand/m-p/214254#M67809</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any ideas??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Apr 2011 21:18:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-13T21:18:29Z</dc:date>
    <item>
      <title>Coverage of Supplies with respect to Stock and Demand</title>
      <link>https://community.qlik.com/t5/QlikView/Coverage-of-Supplies-with-respect-to-Stock-and-Demand/m-p/214252#M67807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;I think I am not upto this task to build this in Qlikview. I will try lasttime here before giving up. May be John or someother Experts here may help.&lt;/P&gt;&lt;P&gt;As given in the attached ExcelSheet &lt;B&gt;I need to find the Coverage of the days of Suppy(&lt;/B&gt;For Ex value &lt;B&gt;26&lt;/B&gt; in the attached Excelsheet.) for the ComingWeeks.&lt;/P&gt;&lt;P&gt;This 26 is for present Year-week:201115. It will change from week to week! So it must be Dynamic.&lt;/P&gt;&lt;P&gt;[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.00.49.52/Example-Shortage-Reporting.xlsx]&lt;/P&gt;&lt;P&gt;[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.00.49.52/ShortageReporting_5F00_Forum.qvw]&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;sravan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 17:46:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Coverage-of-Supplies-with-respect-to-Stock-and-Demand/m-p/214252#M67807</guid>
      <dc:creator />
      <dc:date>2011-04-13T17:46:00Z</dc:date>
    </item>
    <item>
      <title>Coverage of Supplies with respect to Stock and Demand</title>
      <link>https://community.qlik.com/t5/QlikView/Coverage-of-Supplies-with-respect-to-Stock-and-Demand/m-p/214253#M67808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/7485.COVERAGE-Calculation.docx:550:0]&lt;/P&gt;&lt;P&gt;It looks a little bit complicated but the process of Coverage looks is as given in this Document.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Sravan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 18:02:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Coverage-of-Supplies-with-respect-to-Stock-and-Demand/m-p/214253#M67808</guid>
      <dc:creator />
      <dc:date>2011-04-13T18:02:34Z</dc:date>
    </item>
    <item>
      <title>Coverage of Supplies with respect to Stock and Demand</title>
      <link>https://community.qlik.com/t5/QlikView/Coverage-of-Supplies-with-respect-to-Stock-and-Demand/m-p/214254#M67809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any ideas??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 21:18:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Coverage-of-Supplies-with-respect-to-Stock-and-Demand/m-p/214254#M67809</guid>
      <dc:creator />
      <dc:date>2011-04-13T21:18:29Z</dc:date>
    </item>
    <item>
      <title>Coverage of Supplies with respect to Stock and Demand</title>
      <link>https://community.qlik.com/t5/QlikView/Coverage-of-Supplies-with-respect-to-Stock-and-Demand/m-p/214255#M67810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be someone can help me. I dont want to give up so easily!&lt;/P&gt;&lt;P class="Refresco-StandardAbsatz"&gt;I need only two steps to get my code right.&lt;/P&gt;&lt;P class="Refresco-StandardAbsatz"&gt;Calculation of Coverage based on 7 days per week:&lt;/P&gt;&lt;P class="Refresco-StandardAbsatz"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Script Calculate Coverage()&lt;BR /&gt;&lt;BR /&gt;For i = 0 to "End of Periods"&lt;BR /&gt; Stock = ST(i)&lt;BR /&gt;&lt;BR /&gt;If Stock &amp;lt;= 0 Than&lt;BR /&gt; CV(i) = 0&lt;BR /&gt; Stop Script&lt;BR /&gt; End If&lt;BR /&gt;&lt;BR /&gt; Demand = 0&lt;BR /&gt; Cover = 0&lt;BR /&gt;&lt;BR /&gt; For j = i+1 to "End of Periods"&lt;BR /&gt;Demand = Demand + DM(j)&lt;BR /&gt; If Demand &amp;gt;= Stock Than&lt;BR /&gt; Demand = Demand - DM(j)&lt;BR /&gt; Rest = Stock - Demand&lt;BR /&gt; If Rest &amp;gt; 0 Than&lt;BR /&gt; Cover = Cover + (7 * Rest / DM(j) )&lt;BR /&gt; End If&lt;BR /&gt; CV(i) = Cover&lt;BR /&gt; Stop Script&lt;BR /&gt; Else&lt;BR /&gt; Cover = Cover + 7&lt;BR /&gt; End If&lt;BR /&gt; End For&lt;BR /&gt;&lt;BR /&gt; If Stock &amp;gt; Demand Than&lt;BR /&gt; Cover = 999&lt;BR /&gt; End if&lt;BR /&gt;&lt;BR /&gt;End For&lt;BR /&gt;&lt;BR /&gt;End Script&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="font-weight: bold"&gt;First Question:&lt;/P&gt;&lt;P&gt;I need to give this "End of Periods"&lt;/P&gt;&lt;P&gt;In Qlikview I defined the Period as a variable vLastWeek&lt;/P&gt;&lt;P&gt;Now for the for loop If I want to get the next 10 weeks assume&lt;/P&gt;&lt;P&gt;I did like this:&lt;/P&gt;&lt;P&gt;For i= 0 to ($(vLastWeek)+ 10)-1&lt;/P&gt;&lt;P&gt;It does not work. How to do this?&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Second Question:&lt;/P&gt;&lt;P&gt;Sum ([KSTKBAL]) is Stock Balance aggregated to weeks and Products in the chart. I need to make this as Stock in the script. How to do this?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Sravan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 09:40:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Coverage-of-Supplies-with-respect-to-Stock-and-Demand/m-p/214255#M67810</guid>
      <dc:creator />
      <dc:date>2011-04-14T09:40:40Z</dc:date>
    </item>
    <item>
      <title>Coverage of Supplies with respect to Stock and Demand</title>
      <link>https://community.qlik.com/t5/QlikView/Coverage-of-Supplies-with-respect-to-Stock-and-Demand/m-p/214256#M67811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The First Problem is solved where I take&lt;/P&gt;&lt;P&gt;For i= $(vLastWeek) to ($(vLastWeek)+3) Though it has a problem when the week changes from 201052 to 201101&lt;/P&gt;&lt;P&gt;For Second Question I am still seeing a solution&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 16:55:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Coverage-of-Supplies-with-respect-to-Stock-and-Demand/m-p/214256#M67811</guid>
      <dc:creator />
      <dc:date>2011-04-15T16:55:08Z</dc:date>
    </item>
  </channel>
</rss>

