Setting up Tableau Predictive Analysis: 3 Easy Steps

on BI, Tableau, Tutorials • May 25th, 2021 • Write for Hevo

Every organization understands the invaluable use of data and leverages it for Analysis. Tableau Predictive Analysis can be employed in any industry for predicting a future outcome using all kinds of historical data. It can be used for predicting Sales, Marketing outcomes, risk, Churn Rate, etc. The probability of a predictive outcome will come in handy allowing you to take the necessary action to help prevent an undesirable outcome. You can also use Tableau Predictive Analysis to predict the outcome on test data to analyze if you would achieve your required goals if things were done differently. 

In this article, you will learn about Tableau Predictive Analysis and the different types of functions you can use for Tableau Predictive Analysis. You will also learn to perform Tableau Predictive Analysis with the help of a step-by-step guide.

Table of Contents

Understanding Tableau

Image Source: Cmswire

Tableau is a pioneer in the Business Intelligence software technology industry that enables any person from any part of the world, irrespective of their professional background to derive valuable insights from data and build visualizations. Tableau is widely known for its intuitive and interactive visualizations. Tableau also empowers users with minimal technical expertise to exploit all of its advanced analytical features. Tableau is available for everyone as a completely managed Cloud-based service called Tableau Online and as an On-Premise Server-based deployment called Tableau Server. 

Tableau also houses a gamut of supporting applications to help the users make the best use of Tableau Server and Tableau Online. Tableau Prep Builder will assist you to connect to as many Data Sources as you need and helps you to prepare your data for analysis through cleansing. Tableau Prep Conductor will allow you to schedule jobs for your Dashboards and Reports. You can also monitor all your work on Tableau and get debugging information. 

Official Documentation of working with Tableau can be found on Tableau’s website.

Understanding the Key Features of Tableau

Tableau is a powerful tool and is widely used by a lot of industries. To understand Tableau better let’s look at some of its key features:

1) Supports Multiple Data Sources

Since every task is performed on data in Tableau, it allows you to integrate your data from a large variety of data sources like:

  • Microsoft Excel
  • CSV files
  • MS SQL Server
  • Oracle
  • IBM DB2
  • Google BigQuery
  • Windows Azure
  • ODBC/JDBC,etc

You can make use of these integrations to stream your data to Tableau and analyze it seamlessly.

2) Houses a Wide Range of Visualizations

Tableau also provides a large number of simple tools for its users (both for technical and non-technical people) and empowers them to create different types of visualizations using their data. You can use these tools and create simple or complex visualizations using Tableau. Its key visualizations include:

  • Scatter plot
  • Line plot
  • Pie Chart 
  • Bar Chart 
  • Bullet Chart
  • Highlight Tables
  • Gantt Chart
  • Boxplot, etc. 

Tableau’s Map features allow you to visualize your data on a geographical map. It is very useful if your data needs to be categorized region-wise or across various countries to help you analyze the performance of each region.

Image Source: Tableau

3) Allows Data Filtering

With the help of Tableau, you can filter data from a single source or multiple sources. But the only condition that needs to be satisfied for filtering data from multiple Data Sources is that the data must have the same dimensions. Once this is satisfied, Tableau automatically updates the required changes to all your worksheets using the same Data Sources and the same filters that you set previously.

4) Dynamic and Real-time Dashboards

Image Source: PlayFairData

You can build dynamic and interactive Dashboards using Tableau. Building Reports and Dashboards is made very simple by Tableau. You can make them more informative by adding colorful charts and diagrams. Using these real-time Dashboards, you can monitor everything in absolute depth for your organization. Tableau also houses a feature that allows you to share your Dashboards and Reports with other employees in the organization.

5) Powerful Collaboration

Every person can work a lot more efficiently if they understand their data and make informed decisions which are critical to success in any organization. Tableau was initially built to enable collaboration among employees. Using Tableau, all the members in a team can share their work, make follow-up queries with fellow peers, and share visualizations with any employee in the organization, allowing them to gain valuable insights easily.

Tableau gives its users the ability to work and understand the data they need from web editing and authoring to Data Source recommendations. You can easily publish your Dashboard to Tableau Server or Tableau Online within seconds and as a result, everyone in your organization can see your insights, ask various questions, and make the right decisions.

Understanding Tableau Predictive Analysis

Predictive Analytics is the method of predicting the probability of future outcomes with the help of Machine Learning, statistical algorithms, and historical data. The main goal of Tableau Predictive Analysis is to best understand the future from the past. Industries are turning to Predictive Analytics to help them solve complex problems and discover new opportunities. The most common uses of Tableau Predictive Analysis are:

  • Predicting fraudulent Behaviour: Pattern detection can prevent criminal behavior so you can use Tableau Predictive Analysis to predict future patterns. Cybersecurity is a growing concern so with the help of efficient behavioral analytics you can examine all actions performed on a network in real-time and spot abnormalities that may result in fraud, vulnerabilities, and advanced threats.
  • Helps to Optimize campaigns: Predictive Analytics can also be employed to detect customer responses or purchases and promote cross-sell opportunities. Predictive models are useful for businesses that want to attract, retain and grow their most profitable customers. 
  • Helps to Optimize Operational Efficiency: Predictive models are being widely used by companies to forecast their inventory storage and manage their resources. Airlines use Predictive Analytics to help them predict the ticket prices. Hotels use Tableau Predictive Analysis to predict the number of guests, helping them maximize occupancy and increase revenue. Any organization can increase efficiency with the help of Tableau Predictive Analysis
  • Reduces your Risk: A well-known example of Predictive Analytics is the use of Credit score data to analyze a buyer’s probability of default for purchases. The Predictive Model generates a credit score to understand a person’s credibility.

Understanding the Different Types of Predictive Models in Tableau

Three different types of regressions are supported by predictive modeling functions: Linear Regression, Regularized Linear Regression, and Gaussian Process Regression. Each model has its use cases, prediction types, and limitations. Let’s take a brief look at each of them:

1) Linear Regression

This regression is also called Least Squares Regression or OLS. Linear Regression can be used in scenarios where there is at least one predictor. In case there are multiple predictors, they must have a linear relationship between the prediction and prediction target, they should not be dependent on the same underlying conditions and they should not represent different instances of the same data (ex. Temperature should not contain data in Celsius and Fahrenheit).

In Tableau, Linear Regression is set as the default model for Predictive Modeling functions unless the model is specified. You can specify the model in the function by including the first argument as model= ”model name” as given in the below given example.

Example:

MODEL_QUANTILE(
"model=linear",
0.5,
SUM([Sales]),
ATTR(DATETRUNC('month',([Order Date]))
)

2) Regularized Linear Regression

This model shows some leniency when compared to the Linear Regression model. You can use this model even if there is no linear relationship between the variables but the catch is that it should almost be a linear relationship. This phenomenon is called Multicollinearity.

This model is more applicable in the real world. To use this model in Tableau

include “model=rl” as the first argument in the function.

Example:

MODEL_QUANTILE(
"model=rl",
0.5,
SUM([Sales]),
ATTR(DATETRUNC('month',([Order Date]))
)

3) Gaussian Process Regression

This model is largely used when there is a non-linear relationship between the prediction target and variable(ex: time and space). To use the Gaussian Process Regression in Tableau, you must have at least one ordered dimension for the predictor, however, it may contain one or more unordered predictors. In Tableau, you can use the Gaussian Process Regression by including “model=gp” as the first augment in your function. 

Note: You cannot use Measures as predictors in Gaussian Process Regression in Tableau. 

Example:

MODEL_PERCENTILE(
"model=gp",
AVG([Days to Ship Actual]),
ATTR(DATETRUNC('month',([Order Date])))
)

Now that you understand the above-given regression models, you can simply choose the one that satisfies the required conditions.

Prerequisites

  • Working knowledge of Tableau
  • A Tableau Developer Account
  • Tableau installed at your workstation

Simplify your Data Analysis with Hevo’s No-code Data Pipelines

Hevo, a No-code Data Pipeline helps to transfer your data from 100+ sources to the Data Warehouse/Destination of your choice to visualize it in your desired BI tool like Tableau. Hevo is fully managed and completely automates the process of not only loading data from your desired source but also takes care of transforming it into an analysis-ready form without having to write a single line of code. Its fault-tolerant architecture ensures that the data is handled in a secure, consistent manner with zero data loss.

It provides a consistent & reliable solution to manage data in real-time and you always have analysis-ready data in your desired destination. It allows you to focus on key business needs and perform insightful analysis using a BI tool of your choice.

Check out Some of the Cool Features of Hevo:

  • Completely Automated: The Hevo platform can be set up in just a few minutes and requires minimal maintenance.
  • Real-Time Data Transfer: Hevo provides real-time data migration, so you can have analysis-ready data always.
  • 100% Complete & Accurate Data Transfer: Hevo’s robust infrastructure ensures reliable data transfer with zero data loss.
  • Scalable Infrastructure: Hevo has in-built integrations for 100+ sources that can help you scale your data infrastructure as required.
  • 24/7 Live Support: The Hevo team is available round the clock to extend exceptional support to you through chat, email, and support calls.
  • Schema Management: Hevo takes away the tedious task of schema management & automatically detects the schema of incoming data and maps it to the destination schema.
  • Live Monitoring: Hevo allows you to monitor the data flow so you can check where your data is at a particular point in time.

You can try Hevo for free by signing up for a 14-day free trial.

Steps to Set Up Tableau Predictive Analysis

Now that you have a good idea about the various types of regression models, let’s dive into the process of setting up Tableau Predictive Analysis:

Step 1: Importing Data from your Data Source

Open Tableau and log into your Developer account. Choose the Data Source that you want to work with. If you need any help connecting with your desired Data Source using Tableau, refer to the official documentation.

Step 2: Choosing the Predictors

This is a very important step in performing Tableau Predictive Analysis. You need to choose your predictors carefully for better efficiency. The predictors used for building a predictive model can be a dimension, field from a data source, computed field, etc. Choose the predictors based on the type of regression model you want to use and check if these satisfy the required conditions.

Step 3: Building a Predictive Model 

The Linear Regression model is set as the default model for Tableau predictive Analysis but it supports all three regression models described above. Tableau houses two functions that you can use to build predictive models based on the type of prediction output of the functions:

1) MODEL_QUANTILE

Tableau Predictive Analysis using MODEL_QUANTILE
Image Source: Tableau

In this function, you can define your output range (numeric) with predictors and target expression at the required quantile. 

Syntax:

MODEL_QUANTILE(
model_specification (optional),
quantile, target_expression,
predictor_expression(s))
  • In the model specification argument, you specify the type of regression model you want to use for Tableau Predictive Analysis.
  • In the quantile argument, specify a number between 0 and 1. For example, 0.5 is the median value so the median quantile is predicted. 
  • In the target_expression argument, specify the target expression you are using.
  • In the predictor_expression(s), include the predictors you are using for analysis. 

2) MODEL_PERCENTILE 

Image Source: Tableau

In this function, the output is a numeric value between 0 and 1(probability of occurrence in future). It tells you if the outcome is less than or equal to the observed mark, defined by the target expression and other predictors. This is also called the Cumulative Distribution Function(CDF).

Syntax:

MODEL_PERCENTILE(
model_specification (optional),
target_expression,
predictor_expression(s))
  • In the model specification argument, you specify the type of regression model you want to use for Tableau Predictive Analysis.
  • In the target_expression argument, specify the target expression you are using.
  • In the predictor_expression(s), include the predictors you are using for analysis. 

Understanding the Limitations of Tableau Predictive Analysis

  • You should always use a calculated field if you want to extend a time series prediction into the future in Tableau Predictive Analysis.
  • You must also make sure that the predictors should be at the same or higher level of detail than the view for Tableau Predictive Analysis. That is, if your view aggregates by state, you should use state or region as a predictor, but not the city. 
  • Performing Real-time Tableau Predictive Analysis is challenging because real-time data transfer is difficult when there are multiple data sources. You will need to manually set everything up and still not get real-time Tableau Predictive Analytics.

Conclusion

In this article, you learned about Tableau, features of Tableau, various regression models used for Tableau Predictive Analysis, the different types of Predictive Modelling functions for Tableau Predictive Analysis, and also about how to set up Tableau Predictive Analysis. Analyzing real-time data in Tableau is challenging because a lot of its data sources don’t support real-time data transfer.

Integrating and analyzing your data from a huge set of diverse sources can be challenging, this is where Hevo comes into the picture. Hevo is a No-code Data Pipeline and has awesome 100+ pre-built integrations that you can choose from. Hevo can help you integrate your data from numerous sources and load them into a destination to analyze real-time data with a BI tool such as Tableau and create your Dashboards. It will make your life easier and make data migration hassle-free. It is user-friendly, reliable, and secure. Check out the pricing details here. Try Hevo by signing up for a 14-day free trial and see the difference!

No-code Data Pipeline for Tableau