![](https://static.wixstatic.com/media/20371a167944413589d6dc0e902cd367.jpg/v1/fill/w_980,h_698,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/20371a167944413589d6dc0e902cd367.jpg)
Analyzing data allows businesses to understand what's working for them and what are the areas of improvement to grow their business. Tableau is an excellent tool that allows you to input your quantitative data and create better visualisation through charts and graphs.
Before analyzing the data in tableau, there are a few important pointers to keep in mind,
Define your goal and understand why you want to do this analysis.
Collect the data for analysis.
Clean the data for better interpretation
Analyze your data
Visualize and interpret the results.
We can do data analysis using Analytics in Tableau by using the below options:
Adding Reference Lines
Forecasting
Cluster
Trend Lines and Trend Models
Let us learn each one of them in detail in this blog.
Adding Reference Lines
Reference Lines allow you to place lines on the plot at specific locations to mark important values. You could use these to mark control limits or to indicate a trend line for a set of data. Reference lines built in Tableau help users to identify the differences more easily between the obtained results and the set objectives.
You can use reference lines to visualize monthly sales against a target sales figure, or show the average sales per category and compare each category to that average.
Let us learn how to add a reference line using the ANALYTICS pane in Tableau.
We are using the sample Superstore data for this example. We will be using Sales and Profit as measures and Category and Sub-Category as dimensions.
Step 1: Add <Category> and <Subcategory> to the columns field and <Sales> to the row field.
![](https://static.wixstatic.com/media/f8c817_a8bcbb728d5948f885b3d62565cd95a3~mv2.png/v1/fill/w_980,h_598,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/f8c817_a8bcbb728d5948f885b3d62565cd95a3~mv2.png)
Step 2 : Now add <Profit> variable under Marks shelf in the color icon.
![](https://static.wixstatic.com/media/f8c817_2d60530bc1894f57a6b7a524871a4f9e~mv2.png/v1/fill/w_980,h_519,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/f8c817_2d60530bc1894f57a6b7a524871a4f9e~mv2.png)
Step 3: Click on the Analytics pane on the tableau desktop, which will display three options under the customs tab. Now add the reference line by dragging and dropping it inside the chart. A pop-up window is generated which contains three options for adding reference lines.
Table - this option will add a reference line to the table across all panes.
Pane - this option will add a reference line on each pane. This means the computed reference lines are recalculated for each pane in the view.
Cell - this option will add a reference line that are calculated for each cell in the view.
![](https://static.wixstatic.com/media/f8c817_14f1c725471447b799fbe5f837a471df~mv2.png/v1/fill/w_980,h_552,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/f8c817_14f1c725471447b799fbe5f837a471df~mv2.png)
Step 4 : For our example, let us add a reference line to the Pane option, which means we will have three reference lines for each category. In the Line option, we will select SUM(PROFIT) from the drop-down menu. The next tab shows the default aggregation set to Average. And in the Label option, we will select computation, which will display the computation being performed. We can also select what to show in the tooltip of the reference line, it we can select any of the options or we can customize according to our preference.
![](https://static.wixstatic.com/media/f8c817_39a4f3374db744eab29040dc6311229c~mv2.png/v1/fill/w_980,h_672,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/f8c817_39a4f3374db744eab29040dc6311229c~mv2.png)
We also have formatting options for the reference line, like changing the type of line, the color of the line or whether we need to fill above the line or below the line. For our example, I selected the red dotted line and selected the computation as a label.
The below reference line will give the average sales for each category to the profit of each category.
![](https://static.wixstatic.com/media/f8c817_e29301147b2a4a5396c4832970a8344d~mv2.png/v1/fill/w_980,h_510,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/f8c817_e29301147b2a4a5396c4832970a8344d~mv2.png)
Forecasting in Tableau
Tableau can forecast quantitative time-series data based on our historic data. Forecasting provides an estimate of what will happen in the future based on our historical data. Forecasting in Tableau uses a technique known as exponential smoothing. Forecast algorithms try to find a regular pattern in measures that can be continued into the future.
Smoothing models capture the evolving trend of your data and extrapolate them into the future. To enable forecasting, you require at least one date field and one measure in your view.
Let us learn how to do forecasting in Tableau with an example,
Step 1 : Add <Order date > to the columns field and <Sales> to the rows field.
![](https://static.wixstatic.com/media/f8c817_8aed6be31ea2476ba945b7d152aa4612~mv2.png/v1/fill/w_980,h_590,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/f8c817_8aed6be31ea2476ba945b7d152aa4612~mv2.png)
Step 2: Now drag and drop the Forecast option from the Analytics tab to the view pane. Tableau will automatically add the Forecast in the color option under the Marks tab.
We can now see our actuals vs our estimates or predictions with a 95% confidence. This forecast is built from a model called exponential smoothing.
![](https://static.wixstatic.com/media/f8c817_e871383ae21447dbb7797c46ca855e75~mv2.png/v1/fill/w_980,h_501,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/f8c817_e871383ae21447dbb7797c46ca855e75~mv2.png)
If the automatically generated forecast is not a good fit for the data, the user can modify the type of forecast by right click and selecting Forecast Options or by selecting Forecast Options from the Analysis menu:
![](https://static.wixstatic.com/media/f8c817_f53edc4f238b4ca090aa605ba883fbae~mv2.png/v1/fill/w_601,h_570,al_c,q_85,enc_auto/f8c817_f53edc4f238b4ca090aa605ba883fbae~mv2.png)
Forecast Length: We can change the length of forecast or prediction by formatting the number of years in the Automatic or Exactly option.
![](https://static.wixstatic.com/media/f8c817_e0e63db2623c4d3aa7f73a4e39010b79~mv2.png/v1/fill/w_602,h_570,al_c,q_85,enc_auto/f8c817_e0e63db2623c4d3aa7f73a4e39010b79~mv2.png)
Source Data: This option will help us to aggregate the data by changing it into years, months or days.
![](https://static.wixstatic.com/media/f8c817_5c65953217af4a81ad61c4ddd1292484~mv2.png/v1/fill/w_602,h_570,al_c,q_85,enc_auto/f8c817_5c65953217af4a81ad61c4ddd1292484~mv2.png)
Forecast model: This option will help us to change the forecast model by Automatic or by custom where we can change the Trend and Season.
We can also change the width of the confidence interval. It also has a helpful description at the bottom that we can use to describe what the forecast is doing.
Cluster
Clustering is a powerful feature in Tableau that allows you to easily group similar dimension members. This type of clustering helps you create statistically-based segments which provide insight into how different groups are similar as well as how they are performing compared to each other than the data in other clusters. In Tableau, we can have a cluster of up to seven color shades or codes at a time.
We can better understand by using a scatter plot for this example,
Step 1 : Add Profit to the columns field and Sales to the Rows field, and also add Customer Name to Detail under Mark.
![](https://static.wixstatic.com/media/f8c817_6f293456241b45cba88b076aa10c0367~mv2.png/v1/fill/w_980,h_519,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/f8c817_6f293456241b45cba88b076aa10c0367~mv2.png)
Step 2 : Now drag and drop Cluster from the analytics tab to the View pane. Tableau will automatically add the clusters to Color under Marks. And you will get the below dialog box,
![](https://static.wixstatic.com/media/f8c817_48726f1a0add4fec95c4c5079fc739d2~mv2.png/v1/fill/w_980,h_515,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/f8c817_48726f1a0add4fec95c4c5079fc739d2~mv2.png)
We will get the above option with the option to define the number of clusters we need to analyze the sales and profit.
![](https://static.wixstatic.com/media/f8c817_2552b4a532b847baa401c94192ec2b6c~mv2.png/v1/fill/w_980,h_491,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/f8c817_2552b4a532b847baa401c94192ec2b6c~mv2.png)
We can view the summary of the model by right-clicking the Clusters from the Colors Marks card and by selecting the option " Describe Clusters". It will display the Summary and Models of the clusters.
Trend Lines and Trend Models :
A trend line is a line showing the patterns or trends emerging from data points. For example, just by looking at a trend line for sales data, we can infer whether the sales are increasing with time, not changing or decreasing. Trend lines can only be added with numeric or date fields in your view. Trend lines helps us to make predictions about our data.
We can add trend lines by dragging and dropping from the Analytics tab or by just right-clicking on the view pane and selecting Show Trend lines.
![](https://static.wixstatic.com/media/f8c817_afb27c641c8f400eb3863264f8a09320~mv2.png/v1/fill/w_826,h_600,al_c,q_90,enc_auto/f8c817_afb27c641c8f400eb3863264f8a09320~mv2.png)
Types of the trend line model in Tableau
Linear Trend Line - A linear trendline usually shows that something is increasing or decreasing at a steady rate.
Logarithmic Trend Line - A logarithmic trendline is a best-fit curved line that is most useful when the rate of change in the data increases or decreases quickly and then levels out. A logarithmic trendline can use negative and/or positive values.
Exponential Trend Line - An exponential trendline is a curved line that is most useful when data values rise or fall at increasingly higher rates. You cannot create an exponential trendline if your data contains zero or negative values.
Polynomial Trend Line - A polynomial trendline is a curved line that is used when data fluctuates.
Power Trend Line - A power trendline is a curved line that is best used with data sets that compare measurements that increase at a specific rate. We cannot create a power trendline if the data contains zero or negative values.
Whenever a trend line model is created in Tableau, the calculations are based on certain assumptions. Every trend line is created by doing computations that depend upon these assumptions.
Conclusion
There are lots of options in Tableau which help to analyze the data and provide insight into what is working for the organization and what to improve in order to grow. We learned how to use reference lines, clusters, forecasting, trend lines, etc. Tableau makes it easy for us to work around these tools so it is easy for us to explore and learn.