<?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: Forecast Calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211685#M625337</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Though in your case, it might be something simple like sum(Sales)*count(distinct Month)/12 or something like that. All depends on your data and what you really want to do, I think.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Nov 2016 00:42:01 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2016-11-08T00:42:01Z</dc:date>
    <item>
      <title>Forecast Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211682#M625334</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;Is there a standard procedure for calculating a forecast of sales by extrapolation (accrued revenues diviert by expired months, then multiplied by months left till yearend )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example: sales till this month November is 2 millions, so every month = 200.000, Extrapolation ist then&lt;/P&gt;&lt;P&gt;November : 2,2 millions&lt;/P&gt;&lt;P&gt;December : 2,4 millions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there is a Standard procedure, can I build it in the loadstatement of my Measure Sales????&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2016 13:53:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211682#M625334</guid>
      <dc:creator>pacoli2013</dc:creator>
      <dc:date>2016-11-07T13:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211683#M625335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you post some different examples and your expected result (best as file)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2016 22:28:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211683#M625335</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-11-07T22:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211684#M625336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The attached example has several ways of showing a forecast. These just use chart expressions. If you really need to calculate it in script instead, I could probably figure it out.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143175_Capture.PNG" style="width: 620px; height: 715px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2016 00:40:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211684#M625336</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-11-08T00:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211685#M625337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Though in your case, it might be something simple like sum(Sales)*count(distinct Month)/12 or something like that. All depends on your data and what you really want to do, I think.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2016 00:42:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211685#M625337</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-11-08T00:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211686#M625338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello John, thank you for your answer and Input .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I build it in in my InvoiceSalesmodel. then I discussed it with my Manager and some Users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always they came with new ideas:&lt;/P&gt;&lt;P&gt;The Forcast should predict next 6 months in advance, &lt;/P&gt;&lt;P&gt;Input amouts should be the last twelve months, for instance we are now in November so the Input should be from Last year November untill now and the Forecast should go from now (November 2016 ) till May next year. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I told them that I wished they figured that out earler. I hope you have some ideas? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2016 14:48:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211686#M625338</guid>
      <dc:creator>pacoli2013</dc:creator>
      <dc:date>2016-11-08T14:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211687#M625339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's been my experience that I rarely get the real requirements until I've already put a QlikView application in front of them. Until they can start interacting with the data, they either don't know or aren't willing to take the time to figure out what they really need in terms of charts and the like. Some of this is my fault, as it was that way for so long that I now by habit just get the most basic of "we want this data" requirements, and then slam out a very basic QlikView with how I might personally want to interact with that data, then solicit feedback. I usually get at least the data model right the first time (I'm usually very familiar with the data), and it's mostly a matter of building additional charts and ways of interacting with the data from there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, that's all an aside. See the attached for a data model solution to your problem, since it seemed that was your preference. I'm sure it could be solved in the chart too if preferred. Here's the script of interest:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CONCATENATE (Data)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; monthstart(today(),iterno()-1) as Month&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,monthstart(today(),iterno()-1)*Slope+Intercept as Sales&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,'Forecast' as Type&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;WHILE iterno() &amp;lt;= 6&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; linest_m(Sales,Month) as Slope&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,linest_b(Sales,Month) as Intercept&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; Month&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,sum(Sales) as Sales&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT Data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;WHERE Month &amp;gt;= monthstart(today(),-12)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;GROUP BY Month&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We're doing a linear regression over the past 12 months of data to predict the future six months of data. We also have types of Actual vs. Forecast, and these are associated with colors loaded in the script and used in the background color expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The linear trendline in the chart is only to show you that it works, and is based only on the previous 12 months. The trendline doesn't match the forecast when all months are shown, but does match when only the past 12 months and the forecast 6 months are shown.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143296_Capture.PNG" style="width: 620px; height: 298px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/143297_Capture2.PNG" style="width: 620px; height: 298px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2016 17:58:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211687#M625339</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-11-08T17:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211688#M625340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your support. &lt;/P&gt;&lt;P&gt;Your solution works, had to change some minor Details (like some fieldnames).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope my Manager likes what he get to see on Monday&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice weekend&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Court&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 10:04:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211688#M625340</guid>
      <dc:creator>pacoli2013</dc:creator>
      <dc:date>2016-11-11T10:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211689#M625341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;Need Your help.&lt;/P&gt;&lt;P&gt;your solution is perfectly working for Organisation forecasting for future months.&lt;/P&gt;&lt;P&gt;But i have some more specific requirement&lt;/P&gt;&lt;P&gt;Let i have Monthwise, Branchwise,Product wise granular data of last 24 months in the following format :&lt;/P&gt;&lt;P&gt;Branch&amp;nbsp;&amp;nbsp;&amp;nbsp; Product&amp;nbsp;&amp;nbsp;&amp;nbsp; Month&amp;nbsp;&amp;nbsp;&amp;nbsp; SaleAmount&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Jan2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Jan2016&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 500&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P03&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;Jan2016&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 800&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Jan2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Jan2016&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 500&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P03&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;Jan2016&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 800&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;And i have to forecast "Product wise","Branch wise", "SaleAmount" for futuremonths, i.e. say for month Feb,2017 and March'2017.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Can you please help...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;bj&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2017 12:51:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211689#M625341</guid>
      <dc:creator>biplabjana77</dc:creator>
      <dc:date>2017-01-06T12:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211690#M625342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just add the dimensions you want to forecast by to the loads where you concatenate the forecast. See attached and script below. Well, this is forecasting 6 months from the past 12, but replace 6 and 12 with whatever you want in this script, and I'd think it would work like you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CONCATENATE (Data)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; Branch&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,Product&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,monthstart(today(),iterno()-1) as Month&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,monthstart(today(),iterno()-1)*Slope+Intercept as Sales&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,'Forecast' as Type&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;WHILE iterno() &amp;lt;= 6&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; Branch&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,Product&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,linest_m(Sales,Month) as Slope&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,linest_b(Sales,Month) as Intercept&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;GROUP BY &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; Branch&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,Product&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; Branch&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,Product&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,Month&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,sum(Sales) as Sales&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT Data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;WHERE Month &amp;gt;= monthstart(today(),-12)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;GROUP BY &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; Branch&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,Product&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,Month&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2017 23:51:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211690#M625342</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2017-01-06T23:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211691#M625343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii John,,&lt;/P&gt;&lt;P&gt;Thanks for your support.Linear Trend works perfectly with my data&lt;/P&gt;&lt;P&gt;Can you please guide to develop the seasonal trend on the basis of the above generated Linear Trend.&lt;/P&gt;&lt;P&gt;i.e. for example, seasonal trend of Feb'2017 will be&lt;/P&gt;&lt;P&gt;Linear Trend of Feb'2017 + (Actual of Feb'2016 - Linear Trend of Feb'2016) &lt;/P&gt;&lt;P&gt;and this is require to generate at Branch,Product level.&lt;/P&gt;&lt;P&gt;Thanks in advance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2017 18:50:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211691#M625343</guid>
      <dc:creator>biplabjana77</dc:creator>
      <dc:date>2017-01-09T18:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211692#M625344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I've understood, see below and attached. I'm now forecasting the next 12 months instead of next 6, because otherwise we can't visually see the relationship of the seasonal changes to the 12 month trend. You can use any number of months you want, it just makes it hard to visually verify that you have the right results. For a single Branch and Product and 12 months forecasted, you should see each forecasted month be the same distance from the trend line as the same month in the previous year. Well, except that I've assumed we can't have negative sales, so we don't go below 0, even if that's what the seasonal trend suggests.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/148892_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Temp:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN style="color: #0000ff;"&gt;NOCONCATENATE&lt;/SPAN&gt;&lt;BR /&gt; &lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt;&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;Branch&lt;/SPAN&gt;&lt;BR /&gt; ,&lt;SPAN style="color: #800000;"&gt;Product&lt;/SPAN&gt;&lt;BR /&gt; ,&lt;SPAN style="color: #800000;"&gt;Month&lt;/SPAN&gt;&lt;BR /&gt; ,&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;RESIDENT&lt;/SPAN&gt; Data&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Month&lt;/SPAN&gt; &amp;gt;= &lt;SPAN style="color: #0000ff;"&gt;monthstart&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;today&lt;/SPAN&gt;(),-12)&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;GROUP&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;BY&lt;/SPAN&gt; &lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;Branch&lt;/SPAN&gt;&lt;BR /&gt; ,&lt;SPAN style="color: #800000;"&gt;Product&lt;/SPAN&gt;&lt;BR /&gt; ,&lt;SPAN style="color: #800000;"&gt;Month&lt;/SPAN&gt;&lt;BR /&gt; ;&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;LEFT&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;JOIN&lt;/SPAN&gt; (Temp)&lt;BR /&gt; &lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;Branch&lt;/SPAN&gt;&lt;BR /&gt; ,&lt;SPAN style="color: #800000;"&gt;Product&lt;/SPAN&gt;&lt;BR /&gt; ,&lt;SPAN style="color: #0000ff;"&gt;linest_m&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;,&lt;SPAN style="color: #800000;"&gt;Month&lt;/SPAN&gt;) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Slope&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;RESIDENT&lt;/SPAN&gt; Temp&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;GROUP&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;BY&lt;/SPAN&gt; &lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;Branch&lt;/SPAN&gt;&lt;BR /&gt; ,&lt;SPAN style="color: #800000;"&gt;Product&lt;/SPAN&gt;&lt;BR /&gt; ;&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;CONCATENATE&lt;/SPAN&gt; (Data)&lt;BR /&gt; &lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;Branch&lt;/SPAN&gt;&lt;BR /&gt; ,&lt;SPAN style="color: #800000;"&gt;Product&lt;/SPAN&gt;&lt;BR /&gt; ,&lt;SPAN style="color: #0000ff;"&gt;addmonths&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Month&lt;/SPAN&gt;,12) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Month&lt;/SPAN&gt;&lt;BR /&gt; ,&lt;SPAN style="color: #0000ff;"&gt;rangemax&lt;/SPAN&gt;(0,&lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;+(&lt;SPAN style="color: #0000ff;"&gt;addmonths&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Month&lt;/SPAN&gt;,12)-&lt;SPAN style="color: #800000;"&gt;Month&lt;/SPAN&gt;)*&lt;SPAN style="color: #800000;"&gt;Slope&lt;/SPAN&gt;) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;&lt;BR /&gt; ,'Forecast' &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Type&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;RESIDENT&lt;/SPAN&gt; Temp&lt;BR /&gt; ;&lt;BR /&gt; &lt;STRONG style=": ; color: #0000ff;"&gt;DROP&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff;"&gt;TABLE&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; Temp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2017 00:49:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211692#M625344</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2017-01-10T00:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211693#M625345</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;Hii John,,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;One more time, thank you for your reply and help.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards&lt;BR /&gt;BJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2017 13:02:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211693#M625345</guid>
      <dc:creator>biplabjana77</dc:creator>
      <dc:date>2017-01-11T13:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211694#M625346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I calculate and apply a linear regression to see the balance of future dates?&lt;/P&gt;&lt;P&gt;From the data shown in the Excel of the link, I must calculate with the methodology of linear regression of future dates, the real is from 28/02/2017 backwards and future dates 01/03/2017 forward and the amounts They are zero, I need to Replace it with the projection, if you can help me I thank you.&lt;/P&gt;&lt;P&gt;What I would like to do is select a date from 2018 and be able to see the value of the projection. Is this possible in the load?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/thread/262596"&gt;https://community.qlik.com/thread/262596&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2017 17:59:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211694#M625346</guid>
      <dc:creator>carlos13</dc:creator>
      <dc:date>2017-06-02T17:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211695#M625347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know its an old one, but could You please explain why for seasonal forecast calculation You use only slope (linest_m) and not intercept (linest_b)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2018 06:16:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1211695#M625347</guid>
      <dc:creator>BeeGees</dc:creator>
      <dc:date>2018-01-31T06:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1571546#M625348</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;How can i use this code, but separate by category?&lt;BR /&gt;why does this doesn't work? (I added category ID from fact table)&lt;BR /&gt;&lt;BR /&gt;LOAD&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; monthstart(Date(today()),iterno()-1) as SaleMonth,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; monthstart(Date(today()),iterno()-1)*Slope+Intercept as Sales,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Forecast' as sale_type&lt;BR /&gt;WHILE iterno() &amp;lt;= 6;&lt;BR /&gt;LOAD&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; linest_m(Sales,SaleMonth) as Slope,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; linest_b(Sales,SaleMonth) as Intercept;&lt;BR /&gt;LOAD&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SaleMonth,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CategoryID,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sum(Sales) as Sales&lt;BR /&gt;Resident Fact_Sales&lt;BR /&gt;WHERE SaleMonth &amp;gt;= monthstart(Date(today()),-6) and CANCEL_FLAG &amp;lt;&amp;gt; 'Y'&lt;BR /&gt;GROUP BY SaleMonth,CategoryID;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2019 08:05:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1571546#M625348</guid>
      <dc:creator>inbarbiri</dc:creator>
      <dc:date>2019-04-21T08:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1579749#M625349</link>
      <description>&lt;P&gt;I have two Years of Data 2017 and 2018 for each 12 month. i want to predict next year sales in each month. can u help me how to forecast next year sales in each month.&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2019 05:34:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1579749#M625349</guid>
      <dc:creator>areebairfan</dc:creator>
      <dc:date>2019-05-14T05:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1619002#M625350</link>
      <description>&lt;P&gt;Dear John&lt;/P&gt;&lt;P&gt;Thanks for your Suggestion. I have tried following script but still i don't know where am missing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do have attached the screen shot of chart and also script i have tried.&lt;/P&gt;&lt;P&gt;Am getting values for only the data for actual month not for the forecasting month.&lt;/P&gt;&lt;P&gt;Kindly Help me out with this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;P&gt;DataLoad:&lt;BR /&gt;LOAD [Party Name],&lt;BR /&gt;Product,&lt;BR /&gt;[Item Name],&lt;BR /&gt;Jan,&lt;BR /&gt;Feb,&lt;BR /&gt;Mar,&lt;BR /&gt;Apr,&lt;BR /&gt;May,&lt;BR /&gt;Jun,&lt;BR /&gt;Jul,&lt;BR /&gt;Aug,&lt;BR /&gt;Sep,&lt;BR /&gt;Oct,&lt;BR /&gt;Nov,&lt;BR /&gt;Dec&lt;BR /&gt;FROM&lt;BR /&gt;[D:\File\Sales - CHENNAI.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is [CHN - July]);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Transform:&lt;BR /&gt;CrossTable(Month,Sales,3)&lt;BR /&gt;Load *&lt;BR /&gt;Resident DataLoad;&lt;/P&gt;&lt;P&gt;FinalData:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;LOAD [Party Name],&lt;BR /&gt;Product,&lt;BR /&gt;[Item Name],&lt;BR /&gt;Date#(Month,'MMM') As Month,&lt;BR /&gt;'2019' As Year,&lt;BR /&gt;Sales&lt;BR /&gt;Resident Transform&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;Load&lt;BR /&gt;[Party Name],&lt;BR /&gt;Product,&lt;BR /&gt;[Item Name],&lt;BR /&gt;Month,&lt;BR /&gt;Month&amp;amp;' '&amp;amp;Year As Month_Year,&lt;BR /&gt;// Month,&lt;BR /&gt;Num_Month,Type,&lt;BR /&gt;Sales&lt;BR /&gt;;&lt;BR /&gt;LOAD&lt;BR /&gt;[Party Name],&lt;BR /&gt;Product,&lt;BR /&gt;[Item Name],&lt;BR /&gt;Month,&lt;BR /&gt;Date#(Year,'YYYY') As Year,&lt;BR /&gt;NUM(Month(Month)) As Num_Month,&lt;BR /&gt;'Actual' As Type,&lt;BR /&gt;Sales&lt;BR /&gt;RESIDENT FinalData;&lt;/P&gt;&lt;P&gt;CONCATENATE (Data)&lt;BR /&gt;LOAD&lt;BR /&gt;[Party Name],&lt;BR /&gt;Product,&lt;BR /&gt;[Item Name],&lt;BR /&gt;// Month&lt;BR /&gt;monthstart(today(),iterno()-1) as Month_Year&lt;BR /&gt;,monthstart(today(),iterno()-1)*Slope+Intercept as Sales&lt;BR /&gt;,'Forecast' as Type&lt;BR /&gt;WHILE iterno() &amp;lt;= 6&lt;BR /&gt;;&lt;BR /&gt;LOAD&lt;BR /&gt;[Party Name],&lt;BR /&gt;Product,&lt;BR /&gt;[Item Name]&lt;BR /&gt;,linest_m(Sales,Month_Year) as Slope&lt;BR /&gt;,linest_b(Sales,Month_Year) as Intercept&lt;BR /&gt;GROUP BY&lt;BR /&gt;[Party Name],&lt;BR /&gt;Product,&lt;BR /&gt;[Item Name]&lt;BR /&gt;;&lt;BR /&gt;LOAD&lt;BR /&gt;[Party Name],&lt;BR /&gt;Product,&lt;BR /&gt;[Item Name],&lt;BR /&gt;Month_Year,&lt;BR /&gt;// Num_Month,&lt;BR /&gt;Sum(Sales) As Sales&lt;BR /&gt;RESIDENT Data&lt;BR /&gt;WHERE Month_Year &amp;gt;= monthstart(today(),-12)&lt;BR /&gt;GROUP BY&lt;BR /&gt;[Party Name],&lt;BR /&gt;Product,&lt;BR /&gt;[Item Name],&lt;BR /&gt;Month_Year&lt;BR /&gt;//Num_Month&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Types:&lt;BR /&gt;LOAD *&lt;BR /&gt;,rgb(R,G,B) as Color&lt;BR /&gt;INLINE [&lt;BR /&gt;Type,R,G,B&lt;BR /&gt;Actual,100,150,200&lt;BR /&gt;Forecast,200,100,100&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Drop Table FinalData;&lt;BR /&gt;Drop Table Transform;&lt;BR /&gt;Drop Table DataLoad;&lt;/P&gt;&lt;P&gt;EXIT SCRIPT;&lt;/P&gt;&lt;P&gt;Thanks for your Suggestion. I have tried following script but still i don't know where am missing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do have attached the screen shot of chart and also script i have tried.&lt;/P&gt;&lt;P&gt;Am getting values for only the data for actual month not for the forecasting month.&lt;/P&gt;&lt;P&gt;Kindly Help me out with this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;P&gt;DataLoad:&lt;BR /&gt;LOAD [Party Name],&lt;BR /&gt;Product,&lt;BR /&gt;[Item Name],&lt;BR /&gt;Jan,&lt;BR /&gt;Feb,&lt;BR /&gt;Mar,&lt;BR /&gt;Apr,&lt;BR /&gt;May,&lt;BR /&gt;Jun,&lt;BR /&gt;Jul,&lt;BR /&gt;Aug,&lt;BR /&gt;Sep,&lt;BR /&gt;Oct,&lt;BR /&gt;Nov,&lt;BR /&gt;Dec&lt;BR /&gt;FROM&lt;BR /&gt;[D:\File\Sales - CHENNAI.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is [CHN - July]);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Transform:&lt;BR /&gt;CrossTable(Month,Sales,3)&lt;BR /&gt;Load *&lt;BR /&gt;Resident DataLoad;&lt;/P&gt;&lt;P&gt;FinalData:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;LOAD [Party Name],&lt;BR /&gt;Product,&lt;BR /&gt;[Item Name],&lt;BR /&gt;Date#(Month,'MMM') As Month,&lt;BR /&gt;'2019' As Year,&lt;BR /&gt;Sales&lt;BR /&gt;Resident Transform&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;Load&lt;BR /&gt;[Party Name],&lt;BR /&gt;Product,&lt;BR /&gt;[Item Name],&lt;BR /&gt;Month,&lt;BR /&gt;Month&amp;amp;' '&amp;amp;Year As Month_Year,&lt;BR /&gt;// Month,&lt;BR /&gt;Num_Month,Type,&lt;BR /&gt;Sales&lt;BR /&gt;;&lt;BR /&gt;LOAD&lt;BR /&gt;[Party Name],&lt;BR /&gt;Product,&lt;BR /&gt;[Item Name],&lt;BR /&gt;Month,&lt;BR /&gt;Date#(Year,'YYYY') As Year,&lt;BR /&gt;NUM(Month(Month)) As Num_Month,&lt;BR /&gt;'Actual' As Type,&lt;BR /&gt;Sales&lt;BR /&gt;RESIDENT FinalData;&lt;/P&gt;&lt;P&gt;CONCATENATE (Data)&lt;BR /&gt;LOAD&lt;BR /&gt;[Party Name],&lt;BR /&gt;Product,&lt;BR /&gt;[Item Name],&lt;BR /&gt;// Month&lt;BR /&gt;monthstart(today(),iterno()-1) as Month_Year&lt;BR /&gt;,monthstart(today(),iterno()-1)*Slope+Intercept as Sales&lt;BR /&gt;,'Forecast' as Type&lt;BR /&gt;WHILE iterno() &amp;lt;= 6&lt;BR /&gt;;&lt;BR /&gt;LOAD&lt;BR /&gt;[Party Name],&lt;BR /&gt;Product,&lt;BR /&gt;[Item Name]&lt;BR /&gt;,linest_m(Sales,Month_Year) as Slope&lt;BR /&gt;,linest_b(Sales,Month_Year) as Intercept&lt;BR /&gt;GROUP BY&lt;BR /&gt;[Party Name],&lt;BR /&gt;Product,&lt;BR /&gt;[Item Name]&lt;BR /&gt;;&lt;BR /&gt;LOAD&lt;BR /&gt;[Party Name],&lt;BR /&gt;Product,&lt;BR /&gt;[Item Name],&lt;BR /&gt;Month_Year,&lt;BR /&gt;// Num_Month,&lt;BR /&gt;Sum(Sales) As Sales&lt;BR /&gt;RESIDENT Data&lt;BR /&gt;WHERE Month_Year &amp;gt;= monthstart(today(),-12)&lt;BR /&gt;GROUP BY&lt;BR /&gt;[Party Name],&lt;BR /&gt;Product,&lt;BR /&gt;[Item Name],&lt;BR /&gt;Month_Year&lt;BR /&gt;//Num_Month&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Types:&lt;BR /&gt;LOAD *&lt;BR /&gt;,rgb(R,G,B) as Color&lt;BR /&gt;INLINE [&lt;BR /&gt;Type,R,G,B&lt;BR /&gt;Actual,100,150,200&lt;BR /&gt;Forecast,200,100,100&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Drop Table FinalData;&lt;BR /&gt;Drop Table Transform;&lt;BR /&gt;Drop Table DataLoad;&lt;/P&gt;&lt;P&gt;EXIT SCRIPT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 869px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/18257iFF3E545F5042C196/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;Thanks in Advance&lt;/P&gt;&lt;P&gt;Vignesh Kumar&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2019 00:17:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecast-Calculation/m-p/1619002#M625350</guid>
      <dc:creator>Vignesh1609</dc:creator>
      <dc:date>2019-08-31T00:17:43Z</dc:date>
    </item>
  </channel>
</rss>

