Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Add linear regression script to the already available curve in an x,y-diagram

How can I add the available script for linear regression (to be chosen from the QLIK functions list) to a curve in an x,y-diagram?

I have chosen the right function, positioned it within the available x,y-diagram script, but the linear regression line was not added to the curve.

Labels (1)
3 Replies
yannick_c
Partner - Contributor III
Partner - Contributor III

balabhaskarqlik

May be this:

You can use below two expressions in your 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))