<?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: linest_b in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/linest-b/m-p/1094683#M939584</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to admit, this was the longest I spent in a while on a community problem - the challenge was too annoying...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is caused by the difference between the two Month fields that you are using in your calculations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- The chart is using the field MonthAsNumber that's running between 1 and 12&lt;/P&gt;&lt;P&gt;- The text box expressions are using the field MonthNumber that's running between 84 and 95 (with the current selection )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously, the Y-intercept of the two trend lines will be different (the second imaginary line has 83 more steps to go).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you replace MonthNumber with MonthAsNumber, everything goes back to normal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a side comment, you seem to have a lot of unnecessary clutter in your app - Expressions that need to be removed, duplicate AGGR() that seems to be redundant etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;P&gt;Upgrade your Qlik skills at the &lt;A href="http://masterssummit.com/"&gt;Masters Summit for Qlik&lt;/A&gt; - coming soon to Milan, Italy!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jan 2016 17:52:37 GMT</pubDate>
    <dc:creator>Oleg_Troyansky</dc:creator>
    <dc:date>2016-01-28T17:52:37Z</dc:date>
    <item>
      <title>linest_b</title>
      <link>https://community.qlik.com/t5/QlikView/linest-b/m-p/1094682#M939583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi QV-Community&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following problem.&lt;/P&gt;&lt;P&gt;I try to rebuild the inbuild Qlikview Trendline.I want to show the slope and the intercept in a textbox.&lt;/P&gt;&lt;P&gt;Therfor i use the following two expressions (for slope and intercept):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Textbox1 (slope):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Linest_m(Total Aggr(aggr((sum({$&amp;lt;MonthDiff={'&amp;gt;=$(vZeitraum12Monate)&amp;lt;=$(vAktuellerMonat)'},&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Kat={'Leere'}&amp;gt;}Daten_D)/sum({$&amp;lt;MonthDiff={'&amp;gt;=$(vZeitraum12Monate)&amp;lt;=$(vAktuellerMonat)'},&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Kat={'Gesamtzahl Vorgang &amp;amp; Recherche'}&amp;gt;}Daten_D)),MonthNumber),MonthNumber), MonthNumber) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Textbox2 (Y-Axis intercept):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Linest_b(Total Aggr(aggr((sum({$&amp;lt;MonthDiff={'&amp;gt;=$(vZeitraum12Monate)&amp;lt;=$(vAktuellerMonat)'},&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Kat={'Leere'}&amp;gt;}Daten_D)/sum({$&amp;lt;MonthDiff={'&amp;gt;=$(vZeitraum12Monate)&amp;lt;=$(vAktuellerMonat)'},&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Kat={'Gesamtzahl Vorgang &amp;amp; Recherche'}&amp;gt;}Daten_D)),MonthNumber),MonthNumber),MonthNumber)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is, that the intercept shown in textbox is not the same value like the value shown through&lt;/P&gt;&lt;P&gt;QV inbuild Trendline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" height="292" src="https://community.qlik.com/legacyfs/online/112848_pastedImage_4.png" style="width: 591px; height: 291.687px;" width="591" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose that QV is calculating from&amp;nbsp; the first available data point. And since i filtered the dimension to the last &lt;/P&gt;&lt;P&gt;12 values QV is still using the first datapoint as intercept value for my textboxvalue ?!?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas how to get the correct value into the textbox?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached a sample qvd file!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for helping&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 15:38:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/linest-b/m-p/1094682#M939583</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2016-01-28T15:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: linest_b</title>
      <link>https://community.qlik.com/t5/QlikView/linest-b/m-p/1094683#M939584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to admit, this was the longest I spent in a while on a community problem - the challenge was too annoying...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is caused by the difference between the two Month fields that you are using in your calculations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- The chart is using the field MonthAsNumber that's running between 1 and 12&lt;/P&gt;&lt;P&gt;- The text box expressions are using the field MonthNumber that's running between 84 and 95 (with the current selection )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously, the Y-intercept of the two trend lines will be different (the second imaginary line has 83 more steps to go).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you replace MonthNumber with MonthAsNumber, everything goes back to normal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a side comment, you seem to have a lot of unnecessary clutter in your app - Expressions that need to be removed, duplicate AGGR() that seems to be redundant etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;P&gt;Upgrade your Qlik skills at the &lt;A href="http://masterssummit.com/"&gt;Masters Summit for Qlik&lt;/A&gt; - coming soon to Milan, Italy!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 17:52:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/linest-b/m-p/1094683#M939584</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2016-01-28T17:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: linest_b</title>
      <link>https://community.qlik.com/t5/QlikView/linest-b/m-p/1094684#M939585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something along the lines discussed in this thread:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/34504"&gt;Matching linest_m and linest_b function to auto-generated trendline&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: Oleg, it's not enough to just replace MonthNumber with MonthAsNumber, the axis needs to start from zero.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 18:01:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/linest-b/m-p/1094684#M939585</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-01-28T18:01:52Z</dc:date>
    </item>
  </channel>
</rss>

