<?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: Trendline macro - forecast / equation / line style in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Trendline-macro-forecast-equation-line-style/m-p/2010255#M1221730</link>
    <description>&lt;P&gt;Unfortunately your answer does not help me &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Nov 2022 10:01:57 GMT</pubDate>
    <dc:creator>techen1</dc:creator>
    <dc:date>2022-11-29T10:01:57Z</dc:date>
    <item>
      <title>Trendline macro - forecast / equation / line style</title>
      <link>https://community.qlik.com/t5/QlikView/Trendline-macro-forecast-equation-line-style/m-p/2005871#M1221534</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;i've created a macro to enable/disable linear trend lines for my bar charts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;sub AddTrendlines
For x = 0 to 5 'NoOfReportPages 
 Objects = ActiveDocument.GetSheet(x).GetSheetObjects
    For i = lBound(Objects) To uBound(Objects)
	    OT = Objects(i).GetObjectType
	    ObjectID = Objects(i).GetObjectID
	      if(OT = 12) then
		    set prop = Objects(i).GetProperties
			set expr = prop.Expressions
			c=expr.Count - 1
			for j = 0 to c
				Objects(i).AddTrend j,1,1
			next
		 end if
	next
 Next
 ActiveDocument.Variables("vLinearTrendline").SetContent "1", true      
end sub

sub RemoveTrendlines
For x = 0 to 5 'NoOfReportPages 
 Objects = ActiveDocument.GetSheet(x).GetSheetObjects
    For i = lBound(Objects) To uBound(Objects)
	    OT = Objects(i).GetObjectType
	    ObjectID = Objects(i).GetObjectID
	     if(OT = 12) then
		    set prop = Objects(i).GetProperties
			set expr = prop.Expressions
			c=expr.Count - 1
			for j = 0 to c
				Objects(i).RemoveTrend j,1,1
			next
		end if
	next
 Next
 ActiveDocument.Variables("vLinearTrendline").SetContent "0", true    
end sub
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to extend the macro "AddTrendlines" by the following things:&lt;/P&gt;
&lt;P&gt;- Display equation (expression tab)&lt;/P&gt;
&lt;P&gt;- Set a forecast value of 3 (axis tab)&lt;/P&gt;
&lt;P&gt;- Change line style to dotted&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know how to realise these things via macro.&lt;/P&gt;
&lt;P&gt;thx 4 your help.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 12:33:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trendline-macro-forecast-equation-line-style/m-p/2005871#M1221534</guid>
      <dc:creator>techen1</dc:creator>
      <dc:date>2022-11-17T12:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Trendline macro - forecast / equation / line style</title>
      <link>https://community.qlik.com/t5/QlikView/Trendline-macro-forecast-equation-line-style/m-p/2009484#M1221685</link>
      <description>&lt;P&gt;A trend line indicates a linear relationship. The equation for a linear relationship is y = mx + b, where x is the independent variable, y is the dependent variable, m is the slope of the line, and b is the y-intercept.&lt;BR /&gt;&lt;FONT color="#FFFFFF"&gt;&lt;A href="https://www.clover-dashboard.com/" target="_self"&gt;&lt;FONT color="#FFFFFF"&gt;Clover.com&lt;/FONT&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 05:43:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trendline-macro-forecast-equation-line-style/m-p/2009484#M1221685</guid>
      <dc:creator>Ryan69</dc:creator>
      <dc:date>2022-11-28T05:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Trendline macro - forecast / equation / line style</title>
      <link>https://community.qlik.com/t5/QlikView/Trendline-macro-forecast-equation-line-style/m-p/2010255#M1221730</link>
      <description>&lt;P&gt;Unfortunately your answer does not help me &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 10:01:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trendline-macro-forecast-equation-line-style/m-p/2010255#M1221730</guid>
      <dc:creator>techen1</dc:creator>
      <dc:date>2022-11-29T10:01:57Z</dc:date>
    </item>
  </channel>
</rss>

