<?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: Negative growth forecast error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Negative-growth-forecast-error/m-p/1297047#M404769</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the Sale has declined, how will you reach Sale limit in the future using regression analysis? The line is going to be downward sloping and you will never get a future date... what is the expectation here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Mar 2017 02:01:40 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-03-29T02:01:40Z</dc:date>
    <item>
      <title>Negative growth forecast error</title>
      <link>https://community.qlik.com/t5/QlikView/Negative-growth-forecast-error/m-p/1297046#M404768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello I need some help to fix the issue below.&lt;/P&gt;&lt;P&gt;I have a sale data where a maximum sale limit of the product has been set. Based on historical sale I am trying to forecast when the sale will reach the sale limit. My script below seem to be working but I notice when there is a &lt;STRONG&gt;negative&lt;/STRONG&gt; sale growth the &lt;STRONG&gt;forecast date is in the past&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Note: the date are Sunday dates (I don't think it matters).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached the data and qvw. files below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sales:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Product&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Sale limit]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Sale&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; forecasting.xls&lt;BR /&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;biff&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;embedded&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;labels&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Sheet1$);&lt;BR /&gt; &lt;BR /&gt; SalesLimitHit:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Product&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Sale limit]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;LINEST_B&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Sale&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))/&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;LINEST_M&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Sale&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),'DD/MM/YYYY') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Limit Hit Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Sales &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Group&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;By&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Product&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Sale limit]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2017 23:52:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Negative-growth-forecast-error/m-p/1297046#M404768</guid>
      <dc:creator>didierodayo</dc:creator>
      <dc:date>2017-03-28T23:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: Negative growth forecast error</title>
      <link>https://community.qlik.com/t5/QlikView/Negative-growth-forecast-error/m-p/1297047#M404769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the Sale has declined, how will you reach Sale limit in the future using regression analysis? The line is going to be downward sloping and you will never get a future date... what is the expectation here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2017 02:01:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Negative-growth-forecast-error/m-p/1297047#M404769</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-29T02:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Negative growth forecast error</title>
      <link>https://community.qlik.com/t5/QlikView/Negative-growth-forecast-error/m-p/1297048#M404770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny the declines in this scenario are actually errors that frequently show up in the data due to technical reasons. Will it be possible to add something like&lt;/P&gt;&lt;P&gt;(IF the current value is lower than the last&amp;nbsp; 2 values then replace current value with the last value) to the sale data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2017 02:09:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Negative-growth-forecast-error/m-p/1297048#M404770</guid>
      <dc:creator>didierodayo</dc:creator>
      <dc:date>2017-03-29T02:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: Negative growth forecast error</title>
      <link>https://community.qlik.com/t5/QlikView/Negative-growth-forecast-error/m-p/1297049#M404771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So are you saying that before performing the regression analysis, check if Sale is greater than the last and last to last sale amount? If it is not, then replace it with last sale? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2017 08:20:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Negative-growth-forecast-error/m-p/1297049#M404771</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-29T08:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Negative growth forecast error</title>
      <link>https://community.qlik.com/t5/QlikView/Negative-growth-forecast-error/m-p/1297050#M404772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes that is correct Sunny. If the Sale is greater or equal to each of&amp;nbsp; the last 2 Sale values . Otherwise the value gets replaced by the last value. &lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2017 08:27:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Negative-growth-forecast-error/m-p/1297050#M404772</guid>
      <dc:creator>didierodayo</dc:creator>
      <dc:date>2017-03-29T08:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Negative growth forecast error</title>
      <link>https://community.qlik.com/t5/QlikView/Negative-growth-forecast-error/m-p/1297051#M404773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sales:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Sale limit], &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sale&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;forecasting.xls&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(biff, embedded labels, table is Sheet1$);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TempSales:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Product = Previous(Product) and Sale &amp;lt; Previous(Sale) and Sale &amp;lt; Previous(Previous(Sale)), Peek('NewSales'), Sale) as NewSales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By Product, Date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Sales;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SalesLimitHit:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Product,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Date((Only([Sale limit])-LINEST_B(NewSales, Date))/LINEST_M(NewSales, Date),'DD/MM/YYYY') as [Limit Hit Date]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident TempSales &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Group By Product;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2017 08:34:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Negative-growth-forecast-error/m-p/1297051#M404773</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-29T08:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: Negative growth forecast error</title>
      <link>https://community.qlik.com/t5/QlikView/Negative-growth-forecast-error/m-p/1297052#M404774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome. That is what I needed. Thanks a lot Sunnny.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2017 08:47:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Negative-growth-forecast-error/m-p/1297052#M404774</guid>
      <dc:creator>didierodayo</dc:creator>
      <dc:date>2017-03-29T08:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Negative growth forecast error</title>
      <link>https://community.qlik.com/t5/QlikView/Negative-growth-forecast-error/m-p/1297053#M404775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2017 09:22:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Negative-growth-forecast-error/m-p/1297053#M404775</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-29T09:22:22Z</dc:date>
    </item>
  </channel>
</rss>

