Bernard K

Jul 3, 2020

How to add Trend lines to a visualization in Tableau

Updated: Apr 29, 2021

Trend line often referred to as line of best fit is a line used to represent the behavior of data sets to determine if there is a pattern – upward or downward trend, to help users make business decision.

In this post, I will share with you a guide on how to add a trend line to a visualization in Tableau.

Let’s create the view first

Using Superstores data set have created this view showing Sales for different product sub-categories in different months of the year.

To add a trend line to your view, choose Analytics pane

And drag Trend Line to the view, drop it on the Trend line model type you would prefer to use, in this case have dropped it to a Linear model

Note: You can edit your trend line by going to the Analysis menu >> Trend Lines >> Edit All Trend Lines…

Where you can change your model type, factors and configure different options such as showing tooltips, confidence bands etc.

You can also format your trend line by going to the Format menu >> Lines…

Trend line description

To see the description of your trend line, hover (mouse over) on the trend line for details.

Trend line model

To view the whole description of your trend line, go to the Analysis menu >> Trend Lines… >> Describe Trend Model…

Here is an example of visualization where trend lines have been used.

You can access and interact with the viz here

I hope this article was helpful to you. To receive more of the Tableau tips and tricks kindly subscribe to our mailing list below.

Thank you for reading.