Introduction to Tableau and Data Visualization

Data Types in Tableau

We will explore Data Types in Tableau by visualizing the global superstore dataset. First download the dataset from this link, and have a look at it.

Before anything, I want you to try to find all the fields which you think are categorical, and all the fields which you think are numerical. (Try not to look at the solution down below)

Here's what I came up with:

Only 5 of the fields are numerical; the others are categorical. If you had trouble classifying the fields, recall our previous definitions:

Categorical data is data that you can split into discrete categories.

For example, you can split the Category field split into: Technology, Office Supplies, and Furniture.

Numerical data refers to data that you can continuously measure.

The profit, sales, discount, quantity and shipping cost fields can be measured in a continuous manner.

To relate this to tableau, we will connect to the global superstore dataset. In the Tableau start screen, choose the Microsoft Excel option. Then, open the excel file.

Drag the orders sheet to the canvas. This will display the dataset in a preview grid, where we can see all of our fields.

If you navigate to "Sheet 1", you'll notice that Tableau assigns each field in the data source to either the Dimensions pane or the Measures pane.

Notice that all the fields we previously identified as Categorical, Tableau treats as **Dimensions. Conversely, **all the data we identified as Numerical, Tableau treats as Measures.

According to Tableau documentation:

"Dimensions contain qualitative values (such as names, dates, or geographical data).

Measures contain numeric, quantitative values that you can measure."

That's it, there's your link! Also, notice that blue is assigned to all discrete dimensions, and green is assigned to all continuous measures.

Understanding data types, and knowing what field is a dimension, and what field is a measure is extremely important. Here's why:

In Tableau, we use dimensions to specify the granularity of a measure's calculation.

Re-read that ^^ sentence 12 times and repeat it to yourself; because its fundamental to all calculations in Tableau.

Say we wanted to know, what is the most profitable category? To find out, we have to take the sum of the profits for each category, like so:

This can be done in Tableau by simply dragging the Category field into columns, and the Profit field to rows.

What we just did was we calculated the profit sum at the granularity of category. Tableau took the aggregated sum of profits for each category, and displayed the total profit for each category as a bar, in a bar plot.

Feedback Summary
2 students





Written Reviews
There are no written reviews yet.