<?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: How to calculate regression line, slope ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-calculate-regression-line-slope/m-p/425283#M1155124</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using the advanced aggregation with the NODISTINCT qualifier, like&amp;nbsp; &lt;EM&gt;... aggr( NODISTINCT Avg( ...&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 10 Mar 2013 19:56:57 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2013-03-10T19:56:57Z</dc:date>
    <item>
      <title>How to calculate regression line, slope ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-regression-line-slope/m-p/425280#M1155121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Qlikview developers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a dashboard which shows the Gasconsumption for every temperature. It is displayed in a scatter chart.&lt;BR /&gt;The user has the option to refine the dataselection up to 4 times and compare them to eachother (by making use of comparative analysis / alternate states) So I have 4 scatter plots in total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For every scatter-plot I want to &lt;EM&gt;calculate&lt;/EM&gt; the regression line. I'm aware of the fact that I can select a "Linear Trendline" under the tab Expressions. But I want to calculate the line myself, and show it in the chart. &lt;SPAN style="font-size: 10pt;"&gt;I also have a table where some statistic data must be displayed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I want to calculate the following values for every line:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;The slope&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;value when x = -10 (Temperature = -10)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that there are Linest_m, Linest_b functions. But I dont know exactly how to apply these functions in my context.&lt;BR /&gt;Can someone help me out?&lt;BR /&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached my qvw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Mar 2013 19:19:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-regression-line-slope/m-p/425280#M1155121</guid>
      <dc:creator />
      <dc:date>2013-03-09T19:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate regression line, slope ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-regression-line-slope/m-p/425281#M1155122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the two expressions of your scatter chart aggregated over the dimension:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=LINEST_M(aggr(Avg({TW1}($(vActiveUnitField))),Cofely.Id),aggr(Avg({TW1}Cofely.Temperature),Cofely.Id))&lt;/P&gt;&lt;P&gt;=LINEST_B(aggr(Avg({TW1}($(vActiveUnitField))),Cofely.Id),aggr(Avg({TW1}Cofely.Temperature),Cofely.Id))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Mar 2013 10:27:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-regression-line-slope/m-p/425281#M1155122</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-03-10T10:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate regression line, slope ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-regression-line-slope/m-p/425282#M1155123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the Linest_M function for the 'Alpa' expression/column in the Regression Characteristics column:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Valuelist(vTWListItem1,vTWListItem2,vTWListItem3,vTWListItem4)='TW1',LINEST_M(aggr(Avg({TW1}($(vActiveUnitField))),Cofely.Id),aggr(Avg({TW1}Cofely.Temperature),Cofely.Id)),' ')&lt;/P&gt;&lt;P&gt;&amp;amp;&lt;/P&gt;&lt;P&gt;if(Valuelist(vTWListItem1,vTWListItem2,vTWListItem3,vTWListItem4)='TW2',LINEST_M(aggr(Avg({TW2}($(vActiveUnitField))),Cofely.Id),aggr(Avg({TW2}Cofely.Temperature),Cofely.Id)),' ')&lt;/P&gt;&lt;P&gt;&amp;amp;&lt;/P&gt;&lt;P&gt;if(Valuelist(vTWListItem1,vTWListItem2,vTWListItem3,vTWListItem4)='TW3',LINEST_M(aggr(Avg({TW3}($(vActiveUnitField))),Cofely.Id),aggr(Avg({TW3}Cofely.Temperature),Cofely.Id)),' ')&lt;/P&gt;&lt;P&gt;&amp;amp;&lt;/P&gt;&lt;P&gt;if(Valuelist(vTWListItem1,vTWListItem2,vTWListItem3,vTWListItem4)='TW4',LINEST_M(aggr(Avg({TW4}($(vActiveUnitField))),Cofely.Id),aggr(Avg({TW4}Cofely.Temperature),Cofely.Id)),' ')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I only see the slope of the first row only. Do you know why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Mar 2013 19:50:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-regression-line-slope/m-p/425282#M1155123</guid>
      <dc:creator />
      <dc:date>2013-03-10T19:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate regression line, slope ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-regression-line-slope/m-p/425283#M1155124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using the advanced aggregation with the NODISTINCT qualifier, like&amp;nbsp; &lt;EM&gt;... aggr( NODISTINCT Avg( ...&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Mar 2013 19:56:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-regression-line-slope/m-p/425283#M1155124</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-03-10T19:56:57Z</dc:date>
    </item>
  </channel>
</rss>

