<?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: Forecasting in Qlikview in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233592#M85129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The forecast should be a linear regression based on the data points you have.&amp;nbsp; There are various definitions of a linear regression, and I don't know which one QlikView is using, so I can't tell you exactly how it calculated 205.&amp;nbsp; I believe the most common is the least sum of squares, which I believe is to say the trend line where if you sum the square of distances of each point to the trend line, you get the lowest possible value.&amp;nbsp; An overview of various calculations is available on wikipedia.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A href="http://en.wikipedia.org/wiki/Linear_regression"&gt;http://en.wikipedia.org/wiki/Linear_regression&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you were more asking what the expression does...&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;if(sum(Sales),sum(Sales)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,linest_m(total aggr(if(sum(Sales),sum(Sales)),Month),Month)*Month &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;+linest_b(total aggr(if(sum(Sales),sum(Sales)),Month),Month))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first if() says that if we have actual data, we use it instead of the forecast.&amp;nbsp; Linest_m calculates a slope, and linest_b calculates a Y-intercept.&amp;nbsp; The "total" keyword is used because we need to ignore the specific month for that data point and calculate a linear regression for all months.&amp;nbsp; The if() inside of the aggr()s makes sure we only include actual data points in our calculation (else we would include 0 for any missing month in our calculation, which would be wrong).&amp;nbsp; The aggr() gives us the set of data points by month, and the linest_x(...,Month) says that Month is our X-axis for the linear regression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Aug 2011 17:09:47 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2011-08-24T17:09:47Z</dc:date>
    <item>
      <title>Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233589#M85126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a linechart with as dimension Year/Period (ex . 201102) and in my expressions Budget and Sales. (see enclosure)&lt;/P&gt;&lt;P&gt;Now for the Sales I would like to make a Forecast (4 up to 6 months).&lt;/P&gt;&lt;P&gt;How can I obtain this. Do I only have to check the box Forecast an put 4 or 6 in it or do I have to put in a formula.&lt;/P&gt;&lt;P&gt;And can I see the values of the forecast ??&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Guy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Feb 2011 16:25:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233589#M85126</guid>
      <dc:creator>guyvermeiren</dc:creator>
      <dc:date>2011-02-28T16:25:49Z</dc:date>
    </item>
    <item>
      <title>Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233590#M85127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't used the forecast feature, but quickly poking at it, it looks like you tell it what KIND of forecast you want by specifying what sort of trend line to use on the Expressions tab for that expression. Then on the Axes tab, you tell it to forecast and how many data points to forecast.&lt;/P&gt;&lt;P&gt;Now on to your questions - what sort of answer do you want? Put in a 4 if you want 4 months forecast. Put in a 6 if you want 6 months forecast. If you want the number of months to forecast to be calculated, enter the calculation you want.&lt;/P&gt;&lt;P&gt;No, you can't see the values for the forecast, which I discovered by asking for a forecast. That didn't surprise me since you don't get to see values for a trend line either.&lt;/P&gt;&lt;P&gt;If you want a linear trend line for your forecast, and you want to see the values, and you only want the forecast where you don't have the data, you could do something like the attached. I think the third chart is closest to what you're asking for, but they all use the same basic approach of calculating a linear trend line themselves.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Feb 2011 23:38:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233590#M85127</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-28T23:38:01Z</dc:date>
    </item>
    <item>
      <title>Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233591#M85128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; hi John, I have set up a forecast using your testLineEquation.qvw and all is working ok - thanks!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm a little confused as to how the calculations/formula works.. could you explain?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In the below table, I have the initial figure calculated at "205"... how does it get this figure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 337pt; border-collapse: collapse;" width="447"&gt;&lt;TBODY&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border: 0.5pt solid gainsboro; width: 74pt; height: 12.75pt; background-color: whitesmoke;" width="98"&gt;MONTH&lt;/TD&gt;&lt;TD class="xl65" style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: gainsboro gainsboro gainsboro #333333; width: 74pt; background-color: whitesmoke;" width="98"&gt;SUM(SALES)&lt;/TD&gt;&lt;TD class="xl65" style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: gainsboro gainsboro gainsboro #333333; width: 74pt; background-color: whitesmoke;" width="98"&gt;FORECAST&lt;/TD&gt;&lt;TD style="border: 0px windowtext; width: 48pt; background-color: transparent;" width="64"&gt;&lt;/TD&gt;&lt;TD style="border: 0px windowtext; width: 67pt; background-color: transparent;" width="89"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl66" height="17" style="border-width: 0px 0px 0.5pt; border-style: none none solid; border-color: black black gainsboro; height: 12.75pt; background-color: whitesmoke;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black gainsboro gainsboro; background-color: whitesmoke;"&gt;R 1,150.00&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black gainsboro gainsboro black; background-color: whitesmoke;"&gt;R 0.00&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px windowtext; background-color: transparent;"&gt;DIFFERENCE&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 100.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 205.00&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border: 0px windowtext; background-color: transparent;"&gt;205&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 500.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 260.00&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border: 0px windowtext; background-color: transparent;"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 150.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 315.00&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border: 0px windowtext; background-color: transparent;"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 400.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 370.00&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border: 0px windowtext; background-color: transparent;"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 0.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 425.00&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border: 0px windowtext; background-color: transparent;"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;6&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 0.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 480.00&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border: 0px windowtext; background-color: transparent;"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;7&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 0.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 535.00&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border: 0px windowtext; background-color: transparent;"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;8&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 0.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 590.00&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border: 0px windowtext; background-color: transparent;"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;9&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 0.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 645.00&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border: 0px windowtext; background-color: transparent;"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;10&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 0.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 700.00&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border: 0px windowtext; background-color: transparent;"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;11&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 0.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 755.00&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border: 0px windowtext; background-color: transparent;"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 0.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 810.00&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border: 0px windowtext; background-color: transparent;"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 12:27:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233591#M85128</guid>
      <dc:creator />
      <dc:date>2011-08-24T12:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233592#M85129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The forecast should be a linear regression based on the data points you have.&amp;nbsp; There are various definitions of a linear regression, and I don't know which one QlikView is using, so I can't tell you exactly how it calculated 205.&amp;nbsp; I believe the most common is the least sum of squares, which I believe is to say the trend line where if you sum the square of distances of each point to the trend line, you get the lowest possible value.&amp;nbsp; An overview of various calculations is available on wikipedia.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A href="http://en.wikipedia.org/wiki/Linear_regression"&gt;http://en.wikipedia.org/wiki/Linear_regression&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you were more asking what the expression does...&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;if(sum(Sales),sum(Sales)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,linest_m(total aggr(if(sum(Sales),sum(Sales)),Month),Month)*Month &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;+linest_b(total aggr(if(sum(Sales),sum(Sales)),Month),Month))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first if() says that if we have actual data, we use it instead of the forecast.&amp;nbsp; Linest_m calculates a slope, and linest_b calculates a Y-intercept.&amp;nbsp; The "total" keyword is used because we need to ignore the specific month for that data point and calculate a linear regression for all months.&amp;nbsp; The if() inside of the aggr()s makes sure we only include actual data points in our calculation (else we would include 0 for any missing month in our calculation, which would be wrong).&amp;nbsp; The aggr() gives us the set of data points by month, and the linest_x(...,Month) says that Month is our X-axis for the linear regression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 17:09:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233592#M85129</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-08-24T17:09:47Z</dc:date>
    </item>
    <item>
      <title>Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233593#M85130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response John. I have the same table above with the inner if() removed in a second column and I can see the equation takes the full month into account and doesnt give an accurate forecast &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 355pt; border-collapse: collapse;" width="473"&gt;&lt;TBODY&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border: 0.5pt solid gainsboro; width: 33pt; height: 12.75pt; background-color: whitesmoke;" width="44"&gt;MONTH&lt;/TD&gt;&lt;TD class="xl65" style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: gainsboro gainsboro gainsboro #333333; width: 57pt; background-color: whitesmoke;" width="76"&gt;SUM(SALES)&lt;/TD&gt;&lt;TD class="xl65" style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: gainsboro gainsboro gainsboro #333333; width: 66pt; background-color: whitesmoke;" width="88"&gt;FORECAST (IF)&lt;/TD&gt;&lt;TD class="xl65" style="border-width: 0.5pt 0.5pt 0.5pt 0px; border-style: solid solid solid none; border-color: gainsboro gainsboro gainsboro #333333; width: 80pt; background-color: whitesmoke;" width="106"&gt;FORECAST (no IF)&lt;/TD&gt;&lt;TD style="border: 0px windowtext; width: 19pt; background-color: transparent;" width="25"&gt;&lt;/TD&gt;&lt;TD class="xl70" style="border-width: 0px 0px 0px 0.5pt; border-style: none none none solid; border-color: #333333 #333333 #333333 gainsboro; width: 47pt; background-color: whitesmoke;" width="63"&gt;DIFF #1&lt;/TD&gt;&lt;TD class="xl70" style="border-width: 0px 0px 0px 0.5pt; border-style: none none none solid; border-color: #333333 #333333 #333333 gainsboro; width: 53pt; background-color: whitesmoke;" width="71"&gt;DIFF #2&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl66" height="17" style="border-width: 0px 0px 0.5pt; border-style: none none solid; border-color: black black gainsboro; height: 12.75pt; background-color: whitesmoke;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: black gainsboro gainsboro; background-color: whitesmoke;"&gt;R 1,150.00&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black gainsboro gainsboro black; background-color: whitesmoke;"&gt;R 0.00&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: black gainsboro gainsboro black; background-color: whitesmoke;"&gt;R 0.00&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 100.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 205.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 262.18&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R 205.00&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R 262.18&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 500.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 260.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 231.93&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R 55.00&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R -30.24&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 150.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 315.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 201.69&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R 55.00&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R -30.24&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 400.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 370.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 171.45&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R 55.00&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R -30.24&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 0.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 425.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 141.20&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R 55.00&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R -30.24&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;6&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 0.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 480.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 110.96&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R 55.00&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R -30.24&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;7&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 0.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 535.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 80.71&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R 55.00&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R -30.24&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;8&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 0.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 590.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 50.47&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R 55.00&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R -30.24&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;9&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 0.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 645.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 20.22&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R 55.00&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R -30.24&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;10&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 0.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 700.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R-10.02&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R 55.00&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R -30.24&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;11&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 0.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 755.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R-40.27&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R 55.00&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R -30.24&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl68" height="17" style="border-width: 0px 0.5pt 0.5pt; border-style: none solid solid; border-color: #333333 gainsboro gainsboro; height: 12.75pt; background-color: white;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 0.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R 810.00&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-width: 0px 0.5pt 0.5pt 0px; border-style: none solid solid none; border-color: #333333 gainsboro gainsboro #333333; background-color: white;"&gt;R-70.51&lt;/TD&gt;&lt;TD style="border: 0px windowtext; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R 55.00&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border: 0px windowtext; background-color: transparent;"&gt;R -30.24&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;My concern is if there is a month (e.g. month 5) that does result in 0.00 Sales, and they make sales in month 6 (e.g. 500), The forecast would not take month 5 into its calculations correct? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would it not be easier creating an average (avg(total(Sales))) as the forecast? Do you maybe have a formula for this? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 06:38:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233593#M85130</guid>
      <dc:creator />
      <dc:date>2011-08-25T06:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233594#M85131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The inner if() is removing months with 0, so it would remove month 5, yes.&amp;nbsp; Without it, you're including months 7-12.&amp;nbsp; There are other solutions for the inner if(), though.&amp;nbsp; For instance, doing something like &lt;SPAN style="font-family: courier new,courier;"&gt;if(Month&amp;lt;=monthstart(today()),sum(Sales))&lt;/SPAN&gt;, and putting a similar condition on the outer if.&amp;nbsp; It all depends on your requirements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, an average is a &lt;EM&gt;little&lt;/EM&gt; easier than a linear trend.&amp;nbsp; For instance, in the third chart, I could do this:&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;if(Month&amp;lt;=month(today()),sum(Sales),avg(total aggr(if(Month&amp;lt;=month(today()),sum(Sales)),Month)))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you still need the inner if() to avoid counting your forecast months as 0 when calculating the average.&amp;nbsp; And you still need the outer if() to make sure your trend line starts from the last point of real data.&amp;nbsp; And what are your requirements for the forecast?&amp;nbsp; If your users want a linear trend, use a linear trend.&amp;nbsp; If they want an average, use an average.&amp;nbsp; If they want some calculation specific to their business, use that calculation.&amp;nbsp; I can't talk to your users, so I can't tell you what you need to do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 17:01:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233594#M85131</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-08-25T17:01:17Z</dc:date>
    </item>
    <item>
      <title>Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233595#M85132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks for this John. The users want an average, and was just needing a bit of help on the formula for that. Thanks again man!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Aug 2011 16:19:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233595#M85132</guid>
      <dc:creator />
      <dc:date>2011-08-28T16:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233596#M85133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;Hi:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;I like the way you placed it in the graphic.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;I´d like to add some. Time series analysis is not only about the trend analysis. They are also cyclic component, stationary component and random component, and that would be the classic time series analysis.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Arial','sans-serif'; color: #333333; font-size: 10pt;"&gt;I think I posted some file with that Time Series Analysis long ago but my files disappeared along with my points in the last site remodeling.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Aug 2011 06:48:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233596#M85133</guid>
      <dc:creator>christian77</dc:creator>
      <dc:date>2011-08-29T06:48:33Z</dc:date>
    </item>
    <item>
      <title>Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233597#M85134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Everyone's points were recalculated in the move to the new forum, but I don't think files were supposed to disappear.&amp;nbsp; I could be wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Aug 2011 15:03:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233597#M85134</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-08-29T15:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233598#M85135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John - I've been asked to do some forecasting with Qlikview and came accross this post while researching.&amp;nbsp; I've borrowed your example above using the linest b and linest m functions and it works perfectly if I only load 1 years worth of data.&amp;nbsp; Is there a reason this only works with 1 year of data or perhaps I'm doing something wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Simon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2011 14:21:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233598#M85135</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-10-27T14:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233599#M85136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your months are defined like month(Date), then the underlying values are just 1-12, and when you have more than one year of data, that would probably cause problems.&amp;nbsp; I typically define months like date(monthstart(Date),'MMM YYYY').&amp;nbsp; I have no idea if the actual problem you're having has anything to do with this, though.&amp;nbsp; It's just the first thing that occurred to me that might cause problems when you have more than one year of data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Nov 2011 00:24:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233599#M85136</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-11-04T00:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233600#M85137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John.&amp;nbsp; I'm actually not using months as we use fiscal periods and have 13 per calendar year.&amp;nbsp; But I'm guessing the same problem would exist since I'm just loading the period # as 1-13.&amp;nbsp; Not sure how I would get around this as the fiscal period is numeric by default - perhaps if I renamed the periods as P1, P2 etc, thereby making them text?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2011 18:41:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233600#M85137</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-09T18:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233601#M85138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I assume you're using four week periods, then?&amp;nbsp; I'd define a new field which is the period combined with the year.&amp;nbsp; You can use whatever you want as the display.&amp;nbsp; I'd probably use something like 'P7 2011'.&amp;nbsp; But beneath that text, use a dual() function to assign the field the starting date of the period.&amp;nbsp; As an example, we have 52 payroll weeks per year (and so our payroll year starts a little earlier every year).&amp;nbsp; Here's some of the code from where I create a calendar QVD that includes this data:&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;[Calendar]:&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;,dual('W' &amp;amp; "Payroll Week Number Only" &amp;amp; ' ' &amp;amp; "Payroll Week Belongs to Year","Week") as "Payroll Week Number"&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;,date(weekstart("Date",0,-1)) as "Week"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,mod( floor(("Date"-makedate(2010,12,19))/7),52)+1 as "Payroll Week Number Only"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,2011+floor(("Date"-makedate(2010,12,19))/364) as "Payroll Week Belongs to Year"&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 date(today() + 10000 - recno()) as Date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;AUTOGENERATE 20000&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;Now the payroll week number displays like 'W27 2011', but the actual value of the field is a week starting date.&amp;nbsp; Since it's a full date, we can use all the date functions on it, and we can create a trend line that spans multiple years if desired.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2011 18:58:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233601#M85138</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-11-09T18:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233602#M85139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again John.&amp;nbsp; Well, not exactly - our fiscal year runs April 1 to March 31 and after inspection I see that the first and last periods of each year typcially don't have 4 weeks in them (usually 3 and 5 respectively, or somewhere in between). The rest of the periods each year do have 4 weeks to each.&amp;nbsp; To make it worse it changes from fiscal year to year, P1 of 2011 has 23 days, in 2010 it had 24 days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This wouldn't be the first time our fiscal calendar has created challanges for me.&amp;nbsp; Unfortunately I'm not exactly a pro with Qlikview so I'll have to research your code above to understand it more clearly, although I wonder with my strange fiscal calendar I'll even be able to use a similar idea.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2011 19:27:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233602#M85139</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-09T19:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233603#M85140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With your uneven intervals, what I said probably won't be what you want for a trending line.&amp;nbsp; In that case, I'd do similar, but assign a numeric instead of a date.&amp;nbsp; Something like this:&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;LOAD *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,dual('P' &amp;amp; "Period" &amp;amp; ' ' &amp;amp; "Period Belongs to Year","Period Belongs to Year"*13 + "Period" - 1) as "Period and Year"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&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;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,some crazy expression as "Period"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,some related crazy expression as "Period Belongs to Year"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&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;The actual number being assigned isn't critical, just that it increments evenly for every period.&amp;nbsp; The dual() then gives you a field to do linear regression on while still displaying the field value in a sensible&amp;nbsp; way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2011 19:40:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233603#M85140</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-11-09T19:40:24Z</dc:date>
    </item>
    <item>
      <title>Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233604#M85141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to utilize a multi-variable regression with QV? For example, using the LOBF:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Total Sales = B(0) + B(1)*(Month) + B(1)*(Discount) + B(2)*(# of Competitor Brands)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I:&lt;/P&gt;&lt;P&gt;1. Display the forecasted amounts on a chart&lt;/P&gt;&lt;P&gt;2. Use an input box in order to shift the variables in order to modify my forecasts&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;Jon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 22:56:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233604#M85141</guid>
      <dc:creator />
      <dc:date>2012-03-07T22:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233605#M85142</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;&lt;/P&gt;&lt;P&gt;I really like your response. &lt;/P&gt;&lt;P&gt;I'd tested it and it works well as long as I don't select any dimension items. Then my forecasts disappear.&lt;/P&gt;&lt;P&gt;Do you know how to make your formula works whatever selection is made ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Julien&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2012 16:00:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233605#M85142</guid>
      <dc:creator />
      <dc:date>2012-06-13T16:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233606#M85143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not quite sure what you're saying.&amp;nbsp; Do you mean, for instance, that if you select month 6 in my posted example, the forecast disappears?&amp;nbsp; It disappears from the bottom two charts because we have real data for month 6, so don't forecast it.&amp;nbsp; It disappears from the top chart because you can't build a linear trend line from a single data point.&amp;nbsp; If you select months 6 and 7, you'll get a linear trend line based on those two months, which will simply exactly match the values for those two months.&amp;nbsp; If you select more months, you would see a linear trend line appropriate to the months selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want your linear trend line to IGNORE the months you selected, and to always calculate based on all months, you could use set analysis.&amp;nbsp; I believe the expression would look like this:&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; linest_m({&amp;lt;Month=&amp;gt;} total aggr(if(sum({&amp;lt;Month=&amp;gt;}Sales),sum({&amp;lt;Month=&amp;gt;}Sales)),Month),Month)*Month &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;+linest_b({&amp;lt;Month=&amp;gt;} total aggr(if(sum({&amp;lt;Month=&amp;gt;}Sales),sum({&amp;lt;Month=&amp;gt;}Sales)),Month),Month)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2012 19:09:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233606#M85143</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2012-06-13T19:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233607#M85144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear John Not sure you have received my email dated May 27, 2012, kindly help me on this. Many Thanks &amp;amp; Best RdgsSteven From: steven-low@hotmail.com&lt;/P&gt;&lt;P&gt;To: qliktech@sgaur.hosted.jivesoftware.com&lt;/P&gt;&lt;P&gt;Subject: John, need urgent help from you&lt;/P&gt;&lt;P&gt;Date: Sun, 27 May 2012 09:20:26 +0800&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;P&gt;Dear John&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that you are an expert in QV and always help to resolve tough issue in the community.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Kindly advise how to compute Gross Profit and PBIT in the QV report.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Steven&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2012 00:01:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233607#M85144</guid>
      <dc:creator />
      <dc:date>2012-06-14T00:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Forecasting in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233608#M85145</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;&lt;/P&gt;&lt;P&gt;Thanks for those new explanations that gave me new insights.&lt;/P&gt;&lt;P&gt;However, my point concerns the use of forecast when I have dimension items selected. For example, I put a new field "type" in your script to simulate product category.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt; recno() as ID&lt;/P&gt;&lt;P&gt;,ceil(rand()*8) as Month&lt;/P&gt;&lt;P&gt;,ceil(rand()*10) as Sales&lt;/P&gt;&lt;P&gt;,ceil(rand()*3) as type&lt;/P&gt;&lt;P&gt;AUTOGENERATE 50&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I select a "type" the forecast is no more displayed in all the charts. I got only real datas even if I select the 3 items in my "type" field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My goal would be to obtain forecast whatever selection is made in product or customer dimensions for instance. Is that possible ? Is that to be dealed with set analysis ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Julien&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2012 08:30:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Forecasting-in-Qlikview/m-p/233608#M85145</guid>
      <dc:creator />
      <dc:date>2012-06-14T08:30:20Z</dc:date>
    </item>
  </channel>
</rss>

