<?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: Draw Explicit Trend Line in Scatter Chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Draw-Explicit-Trend-Line-in-Scatter-Chart/m-p/1295965#M827339</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Micro,&lt;/P&gt;&lt;P&gt;This is at least close to what you need.&lt;/P&gt;&lt;P&gt;Remove the trendline you have.&lt;/P&gt;&lt;P&gt;Add this expression:&lt;/P&gt;&lt;P&gt;=LINEST_M({1}Total Aggr(sum({1}Sales),Month),Month) * Month&lt;/P&gt;&lt;P&gt;+LINEST_B({1}Total Aggr(sum({1}Sales),Month),Month)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add a trendline to this one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Axes tab make the x and y static min =1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make the x static max : Max({1}Month) +1&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Make the y static max : 20+max({1}Aggr(sum({1}Sales),Month))&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;IMG __jive_id="169999" alt="1.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/169999_1.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; Now if you pick a few points we get :&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;IMG __jive_id="170003" alt="2.jpg" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/170003_2.jpg" style="height: auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sadly the line disappears if you select one point only - hope that's not too disappointing. Maybe a little tweak can correct this.&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;Cheers&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;Andrew&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Jul 2017 15:09:00 GMT</pubDate>
    <dc:creator>effinty2112</dc:creator>
    <dc:date>2017-07-12T15:09:00Z</dc:date>
    <item>
      <title>Draw Explicit Trend Line in Scatter Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Draw-Explicit-Trend-Line-in-Scatter-Chart/m-p/1295964#M827338</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;I have the following Scatter Chart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="169974" alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/169974_1.png" style="height: 233px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Dimension = Month, and Expressions = ONLY(Month) &lt;SPAN style="font-size: 10pt;"&gt;and SUM(Sales).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;What I needed is to get the Trend Line formula (y=mx+b) showed on the chart.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I got that by using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for M value = linest_m(total aggr(sum(Sales),Month),Month) -&amp;gt; -1.1783&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for B value = linest_b(total aggr(sum(Sales),Month),Month) -&amp;gt; 26.742&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing is I need to draw that line as a reference line on the chart (without using the automatic trend line) and get it fixed with those values, even if I make selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know how could I do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attach the QVW file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Draw-Explicit-Trend-Line-in-Scatter-Chart/m-p/1295964#M827338</guid>
      <dc:creator>microwin88x</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Draw Explicit Trend Line in Scatter Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Draw-Explicit-Trend-Line-in-Scatter-Chart/m-p/1295965#M827339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Micro,&lt;/P&gt;&lt;P&gt;This is at least close to what you need.&lt;/P&gt;&lt;P&gt;Remove the trendline you have.&lt;/P&gt;&lt;P&gt;Add this expression:&lt;/P&gt;&lt;P&gt;=LINEST_M({1}Total Aggr(sum({1}Sales),Month),Month) * Month&lt;/P&gt;&lt;P&gt;+LINEST_B({1}Total Aggr(sum({1}Sales),Month),Month)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add a trendline to this one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Axes tab make the x and y static min =1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make the x static max : Max({1}Month) +1&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Make the y static max : 20+max({1}Aggr(sum({1}Sales),Month))&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;IMG __jive_id="169999" alt="1.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/169999_1.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; Now if you pick a few points we get :&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;IMG __jive_id="170003" alt="2.jpg" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/170003_2.jpg" style="height: auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sadly the line disappears if you select one point only - hope that's not too disappointing. Maybe a little tweak can correct this.&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;Cheers&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;Andrew&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 15:09:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Draw-Explicit-Trend-Line-in-Scatter-Chart/m-p/1295965#M827339</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-07-12T15:09:00Z</dc:date>
    </item>
  </channel>
</rss>

