Step 3: Understand variables
When Tableau imports a data file, it reads through it and tries to helpfully creates a variable for each of the column headers and predict how you want to use that data. For example, it will read our "City" and "State" column headers and create a "City, State" variable that is recognized as a geography and can be plotted on a map.
As Tableau reads each column header, it considers these four questions:
- Is the data qualitative or quantitative? (e.g. a category or a measurement)
- Is the data discrete or continuous? (e.g. a finite list of possible terms or an infinite set of possible numbers on a scale)
- What type of data is it? (e.g. text, date, number)
- Is there anything Tableau can add? (e.g. if there is a "City" and a "State" column, add a "City, State" variable)
These concepts will become more familiar as the tutorial progresses and you have a chance to use variables.
Navigate to where you can see the variables
While you can see the raw data on the "Data Source" tab, you need to start creating a chart in order to see the variables that Tableau has created. To do this, click on "Sheet 1" in the lower left-hand corner of the screen and start to examine the "Data" panel on the left-hand side.
Dimensions vs. Measures
The first thing you can see is that Tableau has created a variable for each of the column headers in the data file and it has sorted them into two groups: Dimensions and Measures.
Dimensions are qualitative values that can be used to sort your data into different groups (ex. we might want to sort our data by "Airport" or "Airline"). Measures are quantitative values that represent a particular measurement (ex. "Number of Flights" or "Average Delay").
Discrete vs. Continuous
The next thing you can see is that Tableau has colored some variables green and some variables blue. Blue variables are considered discrete, meaning they have a finite number of values (e.g. "Airlines" has a finite list of possible airline names). Green variables are considered continuous, meaning they exist as values on some kind of scale (e.g. "Number of Flights" has an infinite set of possible values).
To better understand this concept, let's consider our "Date" variable as an example. By default, Tableau has interpreted this data as discrete. This means that, when we try to plot it, Tableau will likely try to give us a table with a discrete series of column headers. However, if we wanted to create a plot with date on the x-axis instead, we would need to tell Tableau to use it as a continuous variable.
Data Type
The next thing you can see is that each variable has an icon next to it that indicates the data type.
Here is a list of what each icon means:
Icon | Data Type |
String (text) | |
Integer values (numbers) | |
Dates | |
Dates with time | |
Booleans (true/false) | |
Geographic |
To better understand this concept, lets consider our "Airport Code" variable. We can see from the "Abc" icon to the left of the name that Tableau is currently interpreting this data as a string of text. However, we want to use this as a geographic location. To change the data type, hover over "Airport Code" until the variable is highlighted and you see a white triangle appear on the right-hand side. Click the white triangle, then select "Geographic Role," followed by "Airport."
You should now see the icon next to "Airport Code" change to a globe. This means Tableau is recognizing this data as a geographic location and we will now be able to use this variable to create maps!
Existing vs. Added
The last thing you can see is that there are several variables whose names appear in italics that were not in our original dataset (e.g. "Measure Names", "Number of Records", "Measure Values" etc.). These are variables that Tableau has added based on its interpretation of our data. For example, "Latitude" and "Longitude" are the coordinates necessary to plot something on a map and Tableau has helpfully added these variables so that it can interpret any of our "State," "City," or "Airport Code" data and place it on a map.
Summary
To recap, variables are displayed on "Sheets" in the "Data" panel on the left-hand side.
When trying to understand how Tableau has interpreted your data, look at the following:
- Position. If it is in the "Dimension" group, it is considered qualitative. If it is in the "Measure" group, it is considered quantitative.
- Color. If the color is blue, it is discrete. If the color is green, it is continuous.
- Icon. The icon will tell you what format the data is.
- Italicization. If a variable is italicized, Tableau has added it to the dataset.
To help you remember this, here is a cheatsheet:
Position | Color | Icon | Italicization | |||
Dimension | Qualitative | Discrete | String (text) | Existing | ||
Measure | Quantiative | Continuous | Integers (numbers) | Added by Tableau | ||
Date | ||||||
Dates with time | ||||||
Booleans (true/false) | ||||||
Geographic |