How to Change the Scope of Trend Lines Tableau

Why the concept of scope is important

Understanding how the scope in trend line and reference line calculations determines the resulting appearance of the line is important not only for the deriving trend and references lines, but for understanding how calculated values and table calculations work in tableau. We’ll cover calculated values in detail in chapter4, but the concept of scope (cell, pane, table) that you learn here will help you when you try for more advanced calculations later.

The below Diagram includes a time series chart on the left that contains two different reference lines and the bullet graph on the right contains a single reference line for each bar (cell) in the view
References lines entire table, pane and cell Diagram :

One way to enhance your Tableau visualizations is by adding a reference line, band, distribution, or box plot to the chart. Reference lines are straight lines that originate from a constant or computed value on an axis.

Reference lines will recalculate and dynamically change based on the selections you make in the view. Simply click on a few marks and, while the original reference line stays intact, it fades, and an updated reference line will appear until you clear or change your selections.

Next, you need to specify the line settings by choosing the measure or value that will be the basis for your reference line. You can also select the appropriate aggregation or value as Average, Constant, Maximum, Median, Minimum, Sum, or Total. For example, if you wanted your reference line to appear at a specific number representing a sales goal, you would choose Constant and then specify the value or choose a field from your data set that contains those target values.

You can then choose how to label and format the line. There are several choices for labels, but notice that the default is set as Computation (such as Average, Maximum, and so on).

The time series chart on the left employs discrete dates to create panes by quarter. Tableau outlines the panes using gray lines. The scope that the calculation tableau uses to create the orange dotted reference line is the table it shows the average value for the entire region. The scope of the blue dashed line is using the quarter panes to derive that reference line. By coincidence, the table average and the pane average lines overlap in the second quarter. In all other quarters in the view, the pane average differs from the average for the entire year (table scope). The bullet graph on the right compares current year values (blue bars) with prior year values plotted using thick black reference lines. Those references lines are applied using cell scope.

Changing the scope of Trend lines

When you add trend lines to the view, you can specify how you want them to look and behave. Scope can also be used to change the appearance of trend lines. The below diagram includes examples of trend lines that are applied by pane, and for the entire table.

Trend lines using pane and table Diagram :

Tableau provides four different kinds of trend lines (linear, logarithmic, exponential, and polynomial). Most people are accustomed of seeing linear (straight) regression lines in time series data. Polynomial regression provides a more curved line. Increasing the degrees of freedom will make the trend line follow the plot of the individual marks more closely. Logarithmic and exponential regression normally results in curved lines.

Different Trend Line and Axis Types

A trendline is always associated with a data series, but a trendline does not represent the data of that data series. Instead, a trend line is used to depict trends in your existing data or forecasts of future data.

One reason for using trend lines is predictive analysis, it helps you see a possible future condition. The choice of method for calculating trend lines requires some professional judgment and is dependent on the data. People associate the word “exponential” with rapid growth. A real-world example of this is provided by the rapid advance of computing power over the past 40 years. Plotting numbers that change drastically and making those figures easy to interpret can be challenging. The diagram shows three different ways to plot a rapidly changing data set.

Rapidly increasing time series diagram :
Time’ is the most important factor which ensures success in a business. It’s difficult to keep up with the pace of time.  But, technology has developed some powerful methods using which we can ‘see things’ ahead of time!!

It is all about the methods of prediction & forecasting. One such method, which deals with time based data is Time Series Modeling. As the name suggests, it involves working on time (years, days, hours, minutes) based data, to derive hidden insights to make informed decision making.

Time series models are very useful models when you have serially correlated data. Most of business houses work on time series data to analyze sales number for the next year, website traffic, competition position and much more. However, it is also one of the areas, which many analysts do not understand.

You can tell by looking at the top two time series plots that the values plotted are increasing very rapidly over a ten-year period. These charts use a linear axis scale. In the top left chart a linear trend line is also used to smooth the data. The top right chart uses an exponential regression line. It’s obvious that the exponential trend line fits the data better. The bottom chart utilizes a logarithmic axis scale, which was altered by right-clicking in the white space of the axis and picking the logarithmic scale option. The trend line is also computed using logarithmic regression.

The tableau’s logarithmic axis scale makes it easier to compare very different values in the same chart as the logarithmic regression line also makes it easier to see what next year’s value might be. If you feel that logarithmic or exponential trend lines might benefit your analysis, you should arm yourself with the technical expertise to explain what the lines mean. As with all statistics, judgment should be applied. History may not repeat.

All the above topics are covered clearly under TABLEAU TRAINING by Mindmajix.


Get Updates on Tech posts, Interview & Certification questions and training schedules