Linear trend line in Graph

It’s a bit of work but for anyone who really wants linear regression calculations in Quick Sight here’s how it can be done:

y = bx +a

Where b = slope of the graph and a = y intercept.

Using an example where x’s represent months from 1 to n, and the y values are Revenue:

Create a calculated field for Slope (b):
(COUNT(Revenue) * SUM(Revenue * Month)-SUM(Revenue) * SUM(Month))/(COUNT(Revenue) * SUM(Month^2)-(SUM(Month)^2))

and a calculated field for Y Intercept (a):
AVERAGE(Revenue) - (Slope * AVERAGE(Month))

You could then calculate y’s for every x, and plot the result to create a trendline.

2 Likes