Introduction to Connecting to Data 

Background

Once you’ve decided on the finest Tableau product for your needs, it’s time to start looking for insights into your data! Data connections, like Tableau’s product portfolio, come in a variety of shapes and sizes. Tableau Desktop: Personal supports four distinct forms of data connections as of this writing, while Tableau Desktop: Professional adds another 48 native ways to connect to data. This does not even take into account the possibility to access online data via bespoke connectors or ODBC connections. Connecting to data from different sources is a key Tableau feature.

Read more: How to Choose Colors for Your Visualizations in Tableau »

Tableau Connecting to Data
Tableau Connecting to Data

You can connect to practically any form of data in Tableau, as you can imagine from the range of connection possibilities, and if you don’t find the connection you’re searching for, someone is certainly working on a bespoke solution that will assist. We could write a whole book about the various data connections, but they all work in the same way and are very obvious. So, for the sake of this article, we’ll show you how to get started with one connection type and a couple of the methods you may get ready to deal with data.

Keep reading: Tableau Data Analyst Certification Questions »

Using Tableau to Connect to Data

In addition to the more than fifty other types of data connections stated in the introduction, each Tableau download includes an example dataset named Sample – Superstore. When you launch Tableau, you’ll get a page like this, where you may select your data connection:

Tableau Desktop: Personal allows you to access the choices under the navigation header “To a File.” Tableau Desktop: Professional supports all conceivable data connections, including data stored on a server.

There are a few data sources towards the bottom of the left navigation that come with every Tableau download. The Sample – Superstore dataset comes with Tableau. We can choose to train with this dataset as it can easily replicate any business scenarios.

Keep on reading: Tableau Desktop Specialist Certification Questions »

When you choose a stored data source, you are instantly sent to the writing interface. We’ll go into obtaining a lay of the land in another post, but for now, we’d want to take a step back and show you what occurs when you connect to a new data source. We can access the data editing interface from ”Data” in the top menu. Go to the data source at the bottom of the dropdown, and select ”Edit Data Source..”. You should be brought to the following screen:

When you connect to an Excel or database connection, you will be greeted with this screen. Tableau treats the Excel workbook as a database and the different tabs as independent tables inside that database. As a result, you can combine tabs together if they share at least one field. Simply drag the table (tab) you wish to link into the data editing interface and tell Tableau what the two tabs share. We can see the Superstore dataset below after set up a left join on Order ID between Orders and Returns.

You may even do cross-database joins using data from various sorts of data connections. To accomplish this, click “Add” to the right of “Connections,” connect to your extra data source, then set up a join as shown in the preceding figure.

If you’re working with many tables that all have the same column headings, unioning, or stacking, the tables may make more sense than joining them. Perhaps you have twelve months of web analytics data in one Excel file, but each month’s data is on a different tab. To join the twelve tabs, drag “New Union” from the left menu into the data editing interface, then drag the tables to be joined into the box that opens. When you establish a union in Tableau, a column that tells you what sheet the data originated from is added.

Column Preparation

There are a few additional choices for preparing each column after you’ve obtained the data you wish to work with. Click the down arrow next to the data type indicator for each column to access them:

These are the options:

Rename: This option allows you to rename the field.

When nothing is selected, the value is copied to the top row of your clipboard (preselecting rows before choosing this option will copy your selection).

Hide: This option hides the whole column.

Aliases…: Allows you to rename particular dimension members.

Create Calculated Field…: This option allows you to create a new field before utilizing it in Tableau.

Create Group: Allows you to group dimension members together. This is useful for rapid data cleanup.

Split: Tableau will examine the dimension members in your column and choose the best method to divide them into numerous columns.

Custom Split…: The same as split, except you, choose how the dimension components are separated.

When you have multiple columns chosen, you may pivot them. Please keep in mind that you can only do one data pivot per data source.

Describe: Provides information about the field.

When going through this procedure for quantitative fields, the string functions are not accessible, but there is an extra option: “Create Bins…” This produces bins of identical size, which may be used to generate histograms.

Finally, you may alter the data type of a column by clicking the data type icon at the column’s top.

It’s vital to remember that any modifications you make to the data at this stage just generate metadata and have no effect on the underlying data source. As a result, you can make quick progress with Tableau without risking destroying your existing infrastructure.

Filters for Extracts and Data Sources

Another noteworthy operation you may choose to perform when connecting to a new data source is to extract or filter the data source. Most data source connections will be active by default, with no filters; buy you can find these settings in the data editor’s upper right corner:

Extracts take a snapshot of your data at the point at which they were made. They are usually quicker than a live data connection, especially when connecting to a database, and come highly recommended. Just keep in mind that extracts must be updated on a regular basis to ensure that you are dealing with the most up-to-date data.

The ability to filter the whole data source before working with it in Tableau is the final option described in this post. By selecting the “Add” button under “Filters,” you may construct these filters with any combination of fields. Because you have the power to filter out data that you don’t need for your analysis, this is a simple way to make your spreadsheets more efficient. For example, if your study is on this year’s data, don’t include data from the previous 10 years! Perhaps you’re creating the workbook for a stakeholder who is only in charge of one division and isn’t authorized to see the performance of other divisions. Adding a filter in this circumstance not only improves the efficiency of the workbook process but also helps you control security to ensure data does not slip into the wrong hands.

With all of these options, you should be able to configure your data precisely how you want it before you begin working with it. However, if you are attempting to convert current Excel reports or working with irregularly shaped data, you may find it useful to learn how to shape data for use with Tableau as well.

Shape Your Data to Be Able To Use It in Tableau

The second thing we wish we had known on our first day with Tableau is that there is an ideal approach to structure data for usage with the program.

When we initially started working with Tableau, we all tried to connect to an existing Excel report and duplicate it in Tableau. After all, this was meant to be intuitive, if not miraculous, software.

We rapidly discovered that nothing worked as expected, that we couldn’t figure out how to create a chart, and that we had to resist the urge to return to our comfortable Excel experience.

It’s nice to look back, and this now appears to be a trivial problem to address, but the scenario we encountered our first time using Tableau is not unusual. Indeed, it is the most prevalent hurdle to Tableau adoption that we have encountered:

First-time users connect to an existing Excel report without regard for the data format.

Most existing Excel reports are not designed to operate well with Tableau, and if a first-time user attempts to work with this data source after preparing their data, they are setting themselves up to fail.

But don’t worry; we can attest to what it’s like to begin using Tableau with no prior data or visualization software knowledge. We’ve always stated that there are three or four critical things to know when getting started with Tableau, and sometimes all you need is someone to tell you what they are so you can connect the dots and get started.

Data Preparation for Tableau

This issue is easy to show, so look at the first image, which is supposed to resemble a regular Excel report:

A headline runs at the top, followed by a column header for each quarter and a row for each KPI (Sales, Profit, and Orders).

On the right side of the table, there is also a total for each row.

The structure of this report causes various issues for Tableau, which will attempt to read the data source, classify the fields, and set up your workspace after connecting:

In the first row, there is a title. Because the first two rows are important for Tableau to comprehend the data source, we’ve already gotten off to a bad start.

Because the column headings are quarters, Tableau will construct a field for each quarter, while the quarters should all be combined into a single field for date/quarter.

Because the KPIs go down the first column, Tableau will not read them as unique fields by default.

In the right column, there is a total. Because Tableau totals fields for you, this is not only useless, but it will almost certainly result in double-counting.

Tableau’s optimal format is as follows:

Because each column now represents a distinct field, the layout is vertical rather than horizontal. The title and totals have been deleted as well.

Tableau will be able to look at the first row to determine the fields and the second row to categorize the data if the data is in this shape (i.e., type, discrete vs. continuous, dimension vs. measure). In the following two entries in this series, we’ll look at how Tableau categorizes data.

As an extra hint, if your data set has a date field that isn’t in a typical date format (as we’ve seen with quarters), we recommend including a column that appears like a real date.

In this scenario, we’ve added a date column and used the first date of each quarter as the entries:

Dates are a particular data type in Tableau, and having dates in a date format recognized by the program unlocks the full power of date fields.

Finally, if you need to reshape data before connecting to Tableau, you may do it before joining, which is our recommendation, or utilize Tableau’s data translator and data pivot tools when you connect.

Regardless of the strategy you use, giving some attention to the form of your data can help you get a good start with your Tableau analysis.


Get our Most Popular Downloads

Download the most popular scenario-based Tableau Workbooks in .twbx format. Used by thousands of Tableau developers and job aspirants every day to improve and fine-tune their CV and Tableau Public profile. Join the largest Tableau Experts Social Group.

Tableau Banking and Financial Dataset Analysis Download
Banking & Financial Dataset Analysis

Financial Domain Tableau Dataset and Analysis. The most important domain in today’s industry. Analyze Key Performance Indicators. Discover Risky and Fraudulent Outliers. Download the Tableau Packaged (.twbx) Workbook. Includes a complete Financial dataset analysis. Enhance your Data Analytics experience with our skilled analysis.

Tableau Healthcare and Hospital Dataset Analysis Download
Healthcare & Hospital Dataset Analysis

Hospital and Healthcare Domain Tableau Dataset and Analysis. A key field of study with millions of lives at stake. The most sensitive industry today. Download the Tableau Packaged (.twbx) Workbook. Understand how healthcare datasets work. Includes a complete Healthcare dataset with analytical charts. Explore Tableau interactive features with this download.

Tableau Insurance Dataset Analysis Download
Insurance Dataset Analysis

Insurance Domain Tableau Dataset and Analysis. Important domain specific metrics and data. Learn how to visualize important metrics. Show outliers and insightful data points. Download the Tableau Packaged (.twbx) Workbook. Includes comprehensive analysis of Insurance data of a large sample population. Uses industry standard analytical practices.

Tableau Practice Test

The best Tableau practice exams built. Period. Explore definitive practical problems created by brilliant Tableau experts.

Get in Touch

Contact Us
Write for Us