# Role of Model and Custom Sections in Tableau

This blog gives a detailed analysis of the Model and Custom Section of the Analytic pane in Tableau Public. If you are unfamiliar with Analytic Pane in Tableau Public and want to know from scratch please read my blog on the Analytic pane and analytic objects used in Summarize section.

__https://www.numpyninja.com/post/exploring-the-analytics-tab-in-tableau-the-summarize-section__

**Model Section**

The model section in the analytics pane gives 5 different data analytics objects such as trend Line, Forecast, Cluster, Average with 95% CI, and Median with 95% CI. Let's understand each in detail.

##### Trend Line

Trend lines are used to visualize the particular trend of a measure based on some dimensions. The trend lines connect two or more points in a series of times and add in the visualization a line or a curve that represents the tendency of the analyzed data. Tableau offers 5 different models to visualize a trend line in your view. The selection of the trend line model depends on the data distribution in the views.

**5 different trend line models are given below:**

**Linear: **Use the Linear Trend Line model if your data follows a linear trend, it represents a best-fit straight line moving in roughly a line from the left to right. A linear trendline usually shows that something is increasing or decreasing at a steady rate.

**Logarithmic:** A logarithmic trendline can be used when the rate of change in the data increases or decreases quickly and then levels out. The logarithmic trend line displays a curved line in the view. A logarithmic trendline can use negative and/or positive values.

**Exponential: **An exponential trendline is a curved line that is most useful when data values rise or fall at increasingly higher rates. Exponential trendlines are not used if your data contains zero or negative values.

**Polynomial:** Use Polynomial Trend Line if your data has clear ups and downs. A polynomial trendline is a curved line that is used when data fluctuates.

**Power: **A power trendline is a curved line that is best used with data sets that compare measurements that increase at a specific rate. This always shows positive rising data.

##### How to Add/Remove/Edit Trend Line in a view :

Now, let's discuss how we can add/ edit/ remove a Trend Line.

** Step 1:** In TableauPublic, connect to the Superstore data source (Source:

__www.kaggle.com__). Create a Line chart visualization of the Month wise Profit in each Region.

** Step 2: **From Analytics Pane drag Trend Line into the view, Tableau automatically opens a submenu bar that shows 5 different trend line models.

**Step 3: **Drop the Trend Line into the appropriate Trend Line model for the view. Here, I used the Linear Trend Line model.

** Step 4:**Click on the trend line in the view and a menubar will be displayed that contains the options to edit, format, and remove the trend line. The below

**Trend line Options**box will appear when you click on the

**Edit**button. The Model type section allows you to switch between different trend line models for the view.

** Step 5: **Click on a trend line and select

**Format.**The sidebar shows a Format Lines pane, look for Trend Lines under Lines. which has the option to change the trend Line format (Color and type of line) in your view.

**Step 6:** To remove a trend line from a visualization, drag it off of the visualization area. You can also click a trend line and select **Remove**.

The final visualizations of Trend Line views are given below:

##### Forecast

Forecasting is about predicting the future value of a measure. There are many models for forecasting. Tableau uses the **Exponential smoothing model **for forecasting. In exponential smoothing, recent observations are given relatively more priority than older observations. These models create forecast views based on the current trend and seasonality of the data. The result of a forecast can also become a field in the visualization created. Tableau takes a time dimension and a measure field to create a forecast. Forecasting is only possible when there is at least one measure in the view.

###### How to Add/Remove/Edit Forecast Analysis in a view :

Now, let's discuss how we can add/ edit/ remove a Forecast Analysis.

** Step 1: **In TableauPublic, connect to the Superstore data source (Source:

__www.kaggle.com__). Create a Line chart visualization of Segment wise Sales/year.

** Step 2: **From Analytics Pane drag and drop

**Forecast**into the view.

** Step 3:**Forecat analysis displays a forecast of sales for exactly one year by default. Here forecast Length is 1.

*Step 4:**Click on the forecast lines in the view then select **Edit**. In the Forecast options box, c*hoose the Forecast Length as 3 years and leave the Forecast Model to Automatic as shown in the following screenshot.

** Step 5:**This view shows a forecast of sales for the next 3 years.

** Step 6:**To remove the Forecast view from a visualization, drag it off of the visualization area. You can also click a forecast line and select

**Remove**.

The final visualization of the Forecast Analysis view is given below:

##### Cluster

Clustering aims to find distinct groups or “clusters” within a data set. Clustering is a powerful analytic object that allows you to group datasets based on some properties. This type of clustering provides insight into how different groups are similar as well as how they are performing compared to each other.

##### How to Add/Remove/Edit Cluster in a view :

Now, let's discuss how we can add/ edit/ remove a Cluster.

** Step 1:**In TableauPublic, connect to the Superstore data source (Source:

__www.kaggle.com__). Create a visualization of Product wise Sales and Profit.

* Step 2: From *the

*Analytic pane drag and drop*the

**C**

**luster***into the view.*You can also double-click

**Cluster**to find clusters in the view.

*Step 3:**Tableau Public automatically gives 2 clusters of the view as shown in *the *screenshot.*

*Step 4:**To edit the number of clusters in the view right click on the **Clusters **under *the *Marks card and select **Edit *Clusters*.*

**Step 5:** Here**, **I** **set the **Number of clusters** as 4. Tableau displays a 4-cluster view of the dataset as shown below.

** Step 6: **Right-click

*on the*

*Clusters**under*the

*Marks card and select*

**This will pop up a message box that contains the summary of clusters.**

*Describe*Clusters.** Step 7: **Tableau creates a Clusters group on Color under marks, and we can format clusters (color, size, label, etc. ) using fields in the

**Marks**card.

**Step 8:**To remove the* number of clusters in the view right click on the **Clusters **under *the *Marks card and select **Remove.*

The final visualization of the Cluster view is given below:

##### Average with 95% CI

This is the first option in the model section of the Analytics pane, it draws a reference line that represents the average of the data in the view and a distribution band that represents the 95% confidence interval of the average. The confidence interval distribution bands shade the region in which the average will fall 95% of the time. We are 95% confident that the average is going to be between the upper and lower limits of that distribution band. You can add these items for a specific measure or for all measures.

**How to Add/Remove/Edit the Average line with 95% CI in a view :**

Now, let's discuss how we can add/ edit/ remove an Average line with 95% CI.

** Step 1: **In TableauPublic, connect to the Superstore data source (Source:

__www.kaggle.com__). Create a Line chart visualization of Month wise Sales.

** Step 2: **When dragging Average with 95% CI into the view we get the following three levels of details (Table, Pane, or Cell) to drop the analytic object.

*Step 3: **Drop*** **Average with 95% CI into

**Table.**

*Given below is the view, When*I

*want*the

*average line*

*with 95% CI distribution band for*the

*entire table.*

*Step 4:** *Click on a resulting average line or distribution and choose Edit. You can see options to change the confidence interval range(here, changed to 90 % confidence interval). Also, I select Value for Label which displays the average, upper limit, and lower limit values in the view. Another way to edit a line or distribution in Tableau Public is to right-click the relevant axis and choose **Edit Reference Line**.

*Step 5:**This is the resulting view after all the above editing.*

*Step 6: **To remove *the *Average line and distribution band from view, c*lick on a resulting average line or distribution and choose **Remove**.

The final visualization of the Average with 95% CI view is given below:

##### Median with 95% CI

The median with 95% CI draws a reference line that represents the median of the data in the view and a distribution band that represents the 95% confidence interval of the median. The Median is represented by the line in the middle of the distribution bands. The confidence interval distribution bands shade the region in which the median will fall 95% of the time. You can add these items for a specific measure or for all measures.

**How to Add/Remove/Edit the Median line with 95% CI in a view :**

Now, let's discuss how we can add/ edit/ remove a Median line with 95% CI.

** Step 1: **In TableauPublic, connect to the Superstore data source (Source:

__www.kaggle.com__). Create a Line chart visualization of Month wise Sales.

** Step 2:**When dragging the Median with 95% CI into the view we get the following three levels of details (Table, Pane, or Cell) to drop the analytic object.

*Step 3: **Drop*** **Median with 95% CI into

**Table.**

*Given below is the view, When*I

*want*the

*median line*

*with 95% CI distribution band for*the

*entire table.*

** Step 4:**Click on a resulting median line or distribution and choose Edit. You can see options to change the confidence interval range(here, changed to 90 % confidence interval). Also, I select Value for Label which displays the median, upper limit, and lower limit values in the view. Another way to edit a line or distribution in Tableau Public is to right-click the relevant axis and choose

**Edit Reference Line**.

*Step 5:**This is the resulting view after all the above editing.*

**Step 6:*** To remove *the *Median line and distribution band from view, c*lick on a resulting median line or distribution and choose **Remove**.

The final visualization of the Median with 95% CI view is given below:

Please visit my Tableau Public Account to see the dashboard Visualization of all the Model Section Analytics objects:

Analytic Pane - Model Section | Tableau Public

**Custom Section**

The Custom section in the analytics pane gives 4 different data analytics objects such as reference Line, Reference Band, Distribution Band, and Box plot. Let's understand each in detail.

##### Reference Line

In Tableau Public, Reference lines are defined as horizontal or vertical lines fixed in a specific region in a view that marks a value such as average, median, minimum, maximum, sum, total, and constants. Reference lines show how the data in the view compares to a reference value. You can add reference lines for a specific measure or for all measures in the view.

##### How to Add/Remove/Edit the Reference line in a view :

Now, let's discuss how we can add/ edit/ remove a Reference line.

** Step 1: **In TableauPublic, connect to the Superstore data source (Source:

__www.kaggle.com__). Create a Bar chart visualization of Region-wise Sales of each Category.

** Step 2: ** Drag a

**Reference Line**from the

**Analytics**pane, we get the following three levels of details (Table, Pane, or Cell) to drop the analytic object.

** Step 3: **Another way to add a Reference Line in Tableau Public is to right-click the relevant axis and choose

**Add Reference Line**.

** Step 4:**Tableau automatically opens an edit dialog box, When you drop the Reference Line to the target( Here, drop it under

**Table**). Here we set the Reference Line as the Average of the Sum(sales).

** Step 5:**The Reference Line will be displayed in the view.