Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
vicks_1079
Contributor
Contributor

Regression line for scatterplot

Hi!

I know this has been discussed multiple times but the proposed solutions aren't working and I was hoping someone could help out. I am trying to add a regression line to my scatterplot.

I used both of the formulas below in the "reference line expression" field but in both instances nothing happens. Could someone please correct my code or let me know if there's another way to add such a line?

=linest_m(total aggr(if(sum(Percent_GNI),sum(Percent_GNI)),Index1),Index1) *
only({1}Index1) +
linest_b(total aggr(if(sum(Percent_GNI),sum(Percent_GNI)),Index1),Index1)

=LINEST_M(Percent_GNI,Index1)*ONLY(Index1)+ LINEST_B(Percent_GNI,Index1)

Labels (4)
0 Replies