Adding trend lines

Trend lines are very useful in observing the relationship between two variables as well as predicting future values. Trend lines are frequently used in simple linear regression to observe the relationship between two variables. The shape of the trend line explains the type of the relationship between the variables. For example, in the case of simple linear regression, the trend line is a straight line, which is represented by the mathematical equation of a straight line: y = mx + c.

Getting ready

Let's use the sample file Sample – Coffee Chain (Access). Open a new worksheet and select Sample – Coffee Chain (Access) as the data source.

How to do it...

Once the data is loaded, perform the following steps to add a trend line to a plot: ...

Get Tableau: Creating Interactive Data Visualizations now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.