top of page

How to add Trend lines to a visualization in Tableau

Writer's picture: Bernard KilonzoBernard Kilonzo
Trend Lines in Tableau

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.

multiple line charts

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

Line of best fit in Tableau

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.

trend lines options

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

formatting trend lines

Trend line description

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

trendline description

Trend line model

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

trendline model

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

Example of a trend line in Tableau

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.

Original.png

We Support You Deliver Business-Focused Solutions That Enable Data-Driven Decision Making.

  • Tableau profile
  • YouTube
  • White LinkedIn Icon
  • Facebook
  • X

QUICK LINKS

CONTACT US

+254 738 307 495

East Gate Mall, Donholm

3rd Floor Suite No. 3i

Nairobi, Kenya

Join our mailing list

bottom of page