<?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 Linear expression from a specific date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Linear-expression-from-a-specific-date/m-p/1706824#M723829</link>
    <description>&lt;P&gt;Hello guys!&lt;/P&gt;&lt;P&gt;First of all, I would like to thanks everybody here who is helping me a lot. I'm learning too much here, and I believe I'm working with QlikView 12 horas a day, for more than a month. This software is amazing!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Now my question is:&lt;/STRONG&gt;&lt;BR /&gt;How can I calculate (via expression), the linear trendline, starting from a specific date ('18/03/2020')?&lt;BR /&gt;&lt;BR /&gt;Look at that:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Trendline overall.png" style="width: 714px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/34692i8787F9611B4D95ED/image-size/large?v=v2&amp;amp;px=999" role="button" title="Trendline overall.png" alt="Trendline overall.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In this case, QlikView is calculating the overall Trendline (based on my dates selection), but I would like to get something like this - see below:&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="4.png" style="width: 484px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/34697i916346D5DE43AFA5/image-size/large?v=v2&amp;amp;px=999" role="button" title="4.png" alt="4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently working with the following expression, but I'm not getting the correct result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if( DVPG &amp;gt; '18/03/2020',
	linest_m(total aggr(if(sum(VDAF) ,sum(VDAF)), DVPG), DVPG)
	* only(DVPG) + linest_b(total aggr(if(sum(VDAF) ,sum(VDAF)), DVPG), DVPG)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the chart I'm getting, and obviouly it's correct:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="result.png" style="width: 715px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/34696i57C97D28C41EE490/image-size/large?v=v2&amp;amp;px=999" role="button" title="result.png" alt="result.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Date field is called DVPG, and the Y axis field is called VDAF.&lt;/P&gt;&lt;P&gt;How can I do that?&lt;BR /&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>brunolelli87</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Linear expression from a specific date</title>
      <link>https://community.qlik.com/t5/QlikView/Linear-expression-from-a-specific-date/m-p/1706824#M723829</link>
      <description>&lt;P&gt;Hello guys!&lt;/P&gt;&lt;P&gt;First of all, I would like to thanks everybody here who is helping me a lot. I'm learning too much here, and I believe I'm working with QlikView 12 horas a day, for more than a month. This software is amazing!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Now my question is:&lt;/STRONG&gt;&lt;BR /&gt;How can I calculate (via expression), the linear trendline, starting from a specific date ('18/03/2020')?&lt;BR /&gt;&lt;BR /&gt;Look at that:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Trendline overall.png" style="width: 714px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/34692i8787F9611B4D95ED/image-size/large?v=v2&amp;amp;px=999" role="button" title="Trendline overall.png" alt="Trendline overall.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In this case, QlikView is calculating the overall Trendline (based on my dates selection), but I would like to get something like this - see below:&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="4.png" style="width: 484px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/34697i916346D5DE43AFA5/image-size/large?v=v2&amp;amp;px=999" role="button" title="4.png" alt="4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently working with the following expression, but I'm not getting the correct result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if( DVPG &amp;gt; '18/03/2020',
	linest_m(total aggr(if(sum(VDAF) ,sum(VDAF)), DVPG), DVPG)
	* only(DVPG) + linest_b(total aggr(if(sum(VDAF) ,sum(VDAF)), DVPG), DVPG)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the chart I'm getting, and obviouly it's correct:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="result.png" style="width: 715px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/34696i57C97D28C41EE490/image-size/large?v=v2&amp;amp;px=999" role="button" title="result.png" alt="result.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Date field is called DVPG, and the Y axis field is called VDAF.&lt;/P&gt;&lt;P&gt;How can I do that?&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linear-expression-from-a-specific-date/m-p/1706824#M723829</guid>
      <dc:creator>brunolelli87</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Linear expression from a specific date</title>
      <link>https://community.qlik.com/t5/QlikView/Linear-expression-from-a-specific-date/m-p/1706838#M723830</link>
      <description>&lt;P&gt;Hey guys, I think I got it with the following expression:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=If(DVPG &amp;gt; '18/03/2020',
(LINEST_M(TOTAL Aggr(avg(DISTINCT If(DVPG &amp;gt; '18/03/2020', VDAF)), DVPG), DVPG) * DVPG)
+LINEST_B(TOTAL Aggr(avg(DISTINCT If(DVPG &amp;gt; '18/03/2020', VDAF)), DVPG), DVPG))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do you guys think about this solution?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 31 May 2020 00:40:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linear-expression-from-a-specific-date/m-p/1706838#M723830</guid>
      <dc:creator>brunolelli87</dc:creator>
      <dc:date>2020-05-31T00:40:48Z</dc:date>
    </item>
  </channel>
</rss>

