5
Assignments
Beginner
Skill Level
20 min
Duration
Free trainings
Subscribe to our Newsletter
Introduction
To create visualizations and dashboards in Tableau Desktop, you must connect to a dataset. Tableau Desktop can connect to different types of data, such as Excel files, relational databases and cloud services like Google Analytics. In this second lesson of our free Tableau Training, you'll learn how to connect to connect to data and how to use the data can prepare for use in Tableau Desktop.
In this lesson you will learn
- How to connect to data with Tableau
- How to prepare data with Tableau for creating visualizations
- How Tableau displays your data
Connecting to data
The goal of data visualization and working with Tableau, is to get insights from your data. For this, of course, you need data! Tableau supports a lot of different data types. Like an Excel file, a CSV file or a database like SQL Server or Oracle. You can also connect to a cloud service such as Google Cloud, Amazon, Google Sheets or Salesforce. So a first step is to connect to a dataset.
To connect to a dataset, select the "Connect to Data" option on the Tableau Desktop welcome screen. A list of different datasets you can connect to will then appear. It is then just a matter of selecting the type of file or type of connection. In this training we will work with a training dataset that is automatically installed, namely the Sample - Superstore dataset. This can be found at the bottom left under "Saved Data Sources", and contains fictitious data about a store selling office supplies in different customer segments, along with the countries, delivery times, returns and managers per region.
Once you have connected to your data source, and you click on "Sheet 1," you will see a populated "Data Pane" on the left side of the screen containing the names of all the fields/columns in your dataset (see Lesson 1, Introduction to Tableau Desktop, Assignment 2). You can use this to explore the data and select the fields you want to use for your visualizations and dashboards. The columns (often called "fields") of your data are displayed here. In addition, there is an icon in front of the column name that shows you what type of data is in that column. We list the most commonly used icons for you:
Text (String) field
Numeric field
Date field
Date and time field
Geographic field
Boolean field
'Discrete' and 'Continuous' data
Another thing to notice is that when you hover over a column name, you see either a blue or a green color. Tableau distinguishes between "Discrete" (blue) or "Continuous" (green) data. Briefly, this is the difference: you can do math with continuous values; you can't do math with discrete values. Discrete (as in: separate, distinct) values are categorical values: the name of a customer, for example, the category of a product. You can determine whether they are the same or not, but it makes little sense to start adding or multiplying with them. On the other hand, you have continuous values, these are often numbers or dates. There is an underlying logic that allows you to calculate with them. For example, you can sum the value of all the products you've sold, and divide it by the number of months in your data set.
By the way, just because a field consists primarily of numbers does not always mean that it is also a continuous value. Adding phone numbers together, for example, does not provide any meaningful insights. At the same time, you could perfectly well use a column of customer names to count the number of different customers. Thus, you use a column of categorical data to create a continuous value that you can in turn calculate with.
This video also gives a good explanation of the differences:
Data source pane
At the very bottom left of the screen we also see the Data Source tab, When we select it we get a look under the hood. We then see the data in table form. Here you can view the content of the data view and check, make changes make changes to the data, or relationships make relationships between different data sets.
The Sample - Superstore dataset is basically an excel file with 3 different tabs. A tab with the orders(Orders), a tab with the managers(People) and a tab with the returns(Returns). You can view the contents of the different tabs by pressing the tab name.
The lines between the tabs indicate the relationship between them. By clicking on the line, you can see which field this relationship is based on. For the line between 'Orders' and 'People' we see that these have a relationship based on the column 'Region'. In the table 'Orders', shows in which region a product was sold. For example, in the region West. Next, the information from the table 'People' is added to this. In the table 'People' contains the name of the account manager for the West region.
Preparing data
It is sometimes necessary to prepare your data prepare and to structure. For example, if a certain column needs to be split or your data needs some cleaned up . You can prepare data in the data source page of Tableau Desktop. Here you can filter, sort, merge and splitting. This allows you to structure the data in the way you need for your visualizations and dashboards.
You can also create Calculated Fields (calculated fields/columns) in Tableau Desktop to virtually add new fields to the table based on the data in the existing fields. (Note: These fields or modifiers exist only in Tableau, you cannot modify the source table in any way from Tableau Desktop). For example, to create a new field for profit by subtracting the selling price from the cost. By creating calculated fields, you can further edit the data and make it more specific to your needs. In Lesson 4, Calculations and Functions in Tableau Desktop, we'll cover these Calculated Fields.
Conclusion
In this section, you learned how to connect to different types of data sources. In addition, you learned what the data will look like in Tableau, and the difference between Discrete and Continuous fields. You are also familiar with the Data Source Pane and how to tie different data sets or tabs together. By properly preparing and structuring the data, you can create effective visualizations and dashboards that provide insight into the data and help make informed decisions. In the next lesson, we'll get into creating visualizations.


