<?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 &amp;quot;TENDENZA&amp;quot; (TREND) function in excel in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/quot-TENDENZA-quot-TREND-function-in-excel/m-p/230642#M82454</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alessandro,&lt;/P&gt;&lt;P&gt;Really interesting problem! I don't think QV has a TREND function built in. But I did some research and Excel's TREND function projects a straight line using the method of least squares. In fact, it essentially acts as a mask for the LINEST function. The QV linest_m function is too confusing for me to decipher, but this is something we can implement manually in QV. The expression that LINEST produces is the following:&lt;/P&gt;&lt;P&gt;m = sum((x-avg(x)*(y-avg(y))/sqr(sum(x-avg(x)))&lt;/P&gt;&lt;P&gt;However, I see from your example that you are setting 'b' to be 0. This makes it even easier:&lt;/P&gt;&lt;P&gt;m=sum(x*y)/sum(sqr(x))&lt;/P&gt;&lt;P&gt;You just use the value of 'm' to multiply by the day and get your updated value. I've replicated that logic in QlikView. See attached example. Cool problem, I haven't had to do math in a while &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Apr 2011 23:04:40 GMT</pubDate>
    <dc:creator>vgutkovsky</dc:creator>
    <dc:date>2011-04-26T23:04:40Z</dc:date>
    <item>
      <title>"TENDENZA" (TREND) function in excel</title>
      <link>https://community.qlik.com/t5/QlikView/quot-TENDENZA-quot-TREND-function-in-excel/m-p/230641#M82453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All!&lt;/P&gt;&lt;P&gt;My customer has this actual values for the first 14 days of the month, considering the month has 23 working days. He needs to calculate the values for the rest of the days (from 15 th to 23 th).&lt;/P&gt;&lt;P&gt;first 14 days:&lt;/P&gt;&lt;P&gt;-507 -346 -389 -391 144 -485 -392 -252 -162 742 5 -116 11 -430 (from 1th to 14 th)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To calculate the values for the rest of the month (forecast trend) he has to apply the TREND FUNCTION of excel and the funtion returns this values:&lt;/P&gt;&lt;P&gt;-179,291 -191,243 -203,196 -215,149 -227,101 -239,054 -251,007 -262,96 -274,912 (from 15 th to 23 th)&lt;/P&gt;&lt;P&gt;I tried to replicate this application in a line chart on qlikview using "linest_m and Linest_B function" but the result is incorreect.&lt;/P&gt;&lt;P&gt;Could you help me please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alessandro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 20:31:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-TENDENZA-quot-TREND-function-in-excel/m-p/230641#M82453</guid>
      <dc:creator />
      <dc:date>2011-04-26T20:31:40Z</dc:date>
    </item>
    <item>
      <title>"TENDENZA" (TREND) function in excel</title>
      <link>https://community.qlik.com/t5/QlikView/quot-TENDENZA-quot-TREND-function-in-excel/m-p/230642#M82454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alessandro,&lt;/P&gt;&lt;P&gt;Really interesting problem! I don't think QV has a TREND function built in. But I did some research and Excel's TREND function projects a straight line using the method of least squares. In fact, it essentially acts as a mask for the LINEST function. The QV linest_m function is too confusing for me to decipher, but this is something we can implement manually in QV. The expression that LINEST produces is the following:&lt;/P&gt;&lt;P&gt;m = sum((x-avg(x)*(y-avg(y))/sqr(sum(x-avg(x)))&lt;/P&gt;&lt;P&gt;However, I see from your example that you are setting 'b' to be 0. This makes it even easier:&lt;/P&gt;&lt;P&gt;m=sum(x*y)/sum(sqr(x))&lt;/P&gt;&lt;P&gt;You just use the value of 'm' to multiply by the day and get your updated value. I've replicated that logic in QlikView. See attached example. Cool problem, I haven't had to do math in a while &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 23:04:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-TENDENZA-quot-TREND-function-in-excel/m-p/230642#M82454</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2011-04-26T23:04:40Z</dc:date>
    </item>
    <item>
      <title>"TENDENZA" (TREND) function in excel</title>
      <link>https://community.qlik.com/t5/QlikView/quot-TENDENZA-quot-TREND-function-in-excel/m-p/230643#M82455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your support Vlad!&lt;/P&gt;&lt;P&gt;Alessandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2011 07:44:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-TENDENZA-quot-TREND-function-in-excel/m-p/230643#M82455</guid>
      <dc:creator />
      <dc:date>2011-04-27T07:44:13Z</dc:date>
    </item>
    <item>
      <title>"TENDENZA" (TREND) function in excel</title>
      <link>https://community.qlik.com/t5/QlikView/quot-TENDENZA-quot-TREND-function-in-excel/m-p/230644#M82456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem, please verify correct answers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2011 12:45:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-TENDENZA-quot-TREND-function-in-excel/m-p/230644#M82456</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2011-04-27T12:45:33Z</dc:date>
    </item>
  </channel>
</rss>

