Let's take a look at another example that will allow us to consider various options for Trend Lines. Using the Real Estate data source, create a view similar to this one:
Here, we've created a scatterplot with the sum of Size (Sq Ft) on Columns to define the x axis and the sum of Price on Rows to define the y axis. Address has been added to the Detail of the Marks card to define the level of aggregation. So, each mark on the scatterplot is a distinct address at a location defined by the size and price. Type of Sale has been placed on Color. Trend Lines have been shown. Per Tableau's default settings, there are three: one trend line per color. The confidence bands have been hidden.
Assuming a good model, the Trend Lines demonstrate how much and how quickly Price is expected to rise in correlation with an increase in Size for each type of sale.
Alternately, you can use the drop-down menu on each of the measure fields on Rows and Columns to change them from measures to dimensions while keeping them continuous. As dimensions, each individual value will define a mark. Keeping them continuous will retain the axes required for Trend Lines.
Let's consider some of the options available for Trend Lines. You can edit Trend Lines by using the menu and selecting Analysis | Trend Lines | Edit Trend Lines... or by right-clicking on a trend line and then selecting Edit Trend Lines.... When you do, you'll see a dialog box similar to this:
Here, you have options for selecting a Model type; selecting applicable fields as factors in the model; allowing discrete colors to define distinct Trend Lines; showing confidence bands; forcing the y intercept to zero; showing recalculated trends for selected marks; and showing tooltips for the trend line. We'll examine these options in further detail.
For now, experiment with the options. Notice how either removing the Type of Sale field as a factor or unchecking the Allow a trend line per color option results in a single trend line.
You can also see the result of excluding a field as a factor in the following view where Type of Sale has been added to Rows:
As represented in the left-hand portion of the preceding screenshot, Type of Sale is included as a factor. This results in a distinct trend line for each type of sale. When Type of Sale is excluded as a factor, the same trend line (which is the overall trend for all types) is drawn three times. This technique can be quite useful for comparing subsets of data to the overall trend.