<?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 How to get a trend line equation? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-get-a-trend-line-equation/m-p/658199#M240178</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="Immagine.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/61248_Immagine.jpg" style="width: 620px; height: 547px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a chart with two expressions, the first one is the main expression (blue line) and the other one is a customized trend line, basically a line which links the first value at "gen 2012" to the last value at "lug 2012". In order to show the equation of the red line I activated the trend line on the second expression and checked the "show equation" option. The user can select the range of months so the X values in the chart are dynamic, and that's the reason why I used the rowNo() function to get the X value (in order to make the equation work I have to assume that "gen 2012" is X=0 and "lug 2012" is X=7).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need to do is to get the m and the b values of the line (m=11568, b=312030). I tried to use the linest_m and linest_b functions in this form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;linest_m(total aggr(Y,X),X)&lt;/P&gt;&lt;P&gt;linest_b(total aggr(Y,X),X)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I write RowNo() instead of the X all I obtain is a crash of QlikView. Do you know any solutions for it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jun 2014 09:35:19 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-06-26T09:35:19Z</dc:date>
    <item>
      <title>How to get a trend line equation?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-a-trend-line-equation/m-p/658199#M240178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="Immagine.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/61248_Immagine.jpg" style="width: 620px; height: 547px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a chart with two expressions, the first one is the main expression (blue line) and the other one is a customized trend line, basically a line which links the first value at "gen 2012" to the last value at "lug 2012". In order to show the equation of the red line I activated the trend line on the second expression and checked the "show equation" option. The user can select the range of months so the X values in the chart are dynamic, and that's the reason why I used the rowNo() function to get the X value (in order to make the equation work I have to assume that "gen 2012" is X=0 and "lug 2012" is X=7).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need to do is to get the m and the b values of the line (m=11568, b=312030). I tried to use the linest_m and linest_b functions in this form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;linest_m(total aggr(Y,X),X)&lt;/P&gt;&lt;P&gt;linest_b(total aggr(Y,X),X)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I write RowNo() instead of the X all I obtain is a crash of QlikView. Do you know any solutions for it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2014 09:35:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-a-trend-line-equation/m-p/658199#M240178</guid>
      <dc:creator />
      <dc:date>2014-06-26T09:35:19Z</dc:date>
    </item>
  </channel>
</rss>

