
Re: How to calculate regression line, slope ?
Gysbert Wassenaar Mar 10, 2013 6:27 AM (in response to Nazeem Soeltan)You can use the two expressions of your scatter chart aggregated over the dimension:
=LINEST_M(aggr(Avg({TW1}($(vActiveUnitField))),Cofely.Id),aggr(Avg({TW1}Cofely.Temperature),Cofely.Id))
=LINEST_B(aggr(Avg({TW1}($(vActiveUnitField))),Cofely.Id),aggr(Avg({TW1}Cofely.Temperature),Cofely.Id))

Re: How to calculate regression line, slope ?
Nazeem Soeltan Mar 10, 2013 3:50 PM (in response to Gysbert Wassenaar )Hi,
I used the Linest_M function for the 'Alpa' expression/column in the Regression Characteristics column:
if(Valuelist(vTWListItem1,vTWListItem2,vTWListItem3,vTWListItem4)='TW1',LINEST_M(aggr(Avg({TW1}($(vActiveUnitField))),Cofely.Id),aggr(Avg({TW1}Cofely.Temperature),Cofely.Id)),' ')
&
if(Valuelist(vTWListItem1,vTWListItem2,vTWListItem3,vTWListItem4)='TW2',LINEST_M(aggr(Avg({TW2}($(vActiveUnitField))),Cofely.Id),aggr(Avg({TW2}Cofely.Temperature),Cofely.Id)),' ')
&
if(Valuelist(vTWListItem1,vTWListItem2,vTWListItem3,vTWListItem4)='TW3',LINEST_M(aggr(Avg({TW3}($(vActiveUnitField))),Cofely.Id),aggr(Avg({TW3}Cofely.Temperature),Cofely.Id)),' ')
&
if(Valuelist(vTWListItem1,vTWListItem2,vTWListItem3,vTWListItem4)='TW4',LINEST_M(aggr(Avg({TW4}($(vActiveUnitField))),Cofely.Id),aggr(Avg({TW4}Cofely.Temperature),Cofely.Id)),' ')
However, I only see the slope of the first row only. Do you know why?

Re: How to calculate regression line, slope ?
Stefan Wühl Mar 10, 2013 3:56 PM (in response to Nazeem Soeltan)Try using the advanced aggregation with the NODISTINCT qualifier, like ... aggr( NODISTINCT Avg( ...

