Tableau Lesson 5 – Data Types | Dataplexa
Section I — Lesson 5

Data Types in Tableau

Every field in your dataset has a data type — and Tableau treats each type differently when you drag it onto a shelf, write a calculation, or build a chart. Getting data types right is one of the most important habits to build early.

The Five Data Types in Tableau

Tableau recognises five core data types. Each one carries a distinct icon in the Data pane, and each one behaves differently when placed on a shelf or used in a formula.

Abc
String (Text)

Any combination of letters, numbers, and symbols stored as plain text. Tableau cannot perform arithmetic on strings — it can only group, filter, and label with them. Examples: Category, Customer Name, Order ID, Region.

#
Number

Numeric values that can be aggregated — summed, averaged, counted, or used in calculations. Tableau further splits numbers into integers and decimals. Examples: Sales, Profit, Quantity, Discount.

📅
Date and Date & Time

Date fields unlock Tableau's built-in date hierarchy — Year, Quarter, Month, Week, Day — allowing you to drill down into any time period with a single click. Examples: Order Date, Ship Date, Hire Date.

T|F
Boolean

A field with only two possible values — True or False. Booleans are useful for filtering and segmenting data. Examples: Returned, Is New Customer, Discount Applied.

🌐
Geographic

A string or number field that Tableau has recognised as a location — country, state, city, or postal code. Geographic fields can be plotted directly onto a map. Examples: Country, State, City, Postal Code.

Data Types in the Data Pane

Here is how the five data types look inside a real Tableau Data pane, using the Superstore dataset as the example:

Data Pane — Superstore Orders
Dimensions
Abc Category
Abc Customer Name
Abc Region
📅 Order Date
📅 Ship Date
🌐 Country
🌐 State
T|F Returned
Measures
# Sales
# Profit
# Quantity
# Discount

Discrete vs Continuous — The Blue and Green Pill

Inside Tableau, every field placed on a shelf appears as either a blue pill or a green pill. This is not just a colour — it controls how Tableau draws the axis and segments the data.

Blue — Discrete

Creates a header — a distinct label for each category value. The axis shows individual buckets: East, West, North, South. Used by default for Dimensions.

Green — Continuous

Creates an axis — a continuous numerical scale from a minimum to a maximum value. Used by default for Measures. The axis shows a range: 0 to 500,000.

A field does not have to stay in its default state. Right-click any field on a shelf and you will see options to convert it between Discrete and Continuous. A common example is Order Date — by default it is discrete (showing individual year labels), but switching it to continuous creates a smooth timeline axis instead.

How Date Fields Behave in Tableau

Date fields deserve extra attention because they behave differently from every other type. When you drag a date field onto the Columns shelf, Tableau does not just show a list of dates — it automatically groups them by Year and gives you a hierarchy you can expand.

Date Level Example Output When to Use
Year 2021, 2022, 2023 High-level trend comparison across years
Quarter Q1, Q2, Q3, Q4 Seasonal patterns within a year
Month January, February… December Monthly performance tracking
Week Week 1, Week 2… Weekly operations or campaigns
Day 1, 2, 3… 31 Daily granularity for short time ranges

Right-clicking a date field on a shelf shows a full list of date levels. You can switch between them at any time — no need to create separate fields for each level in your source data.

Changing a Data Type in Tableau

Tableau sometimes misreads a field's data type — especially when connecting to CSV files or messy Excel sheets. There are two places to fix this:

A
On the Data Source Tab
Click the data type icon above the column in the data preview grid. A dropdown appears with all available types. This is the preferred method — fixing it here applies the correction across the entire workbook.
B
In the Data Pane
Right-click any field in the Data pane and select Change Data Type. Choose the correct type from the submenu. This method works from within any worksheet without going back to the Data Source tab.

A Practical Example — Superstore Data Types

Here is a sample of the Superstore dataset with each column's data type labelled, so you can see how a real table maps to Tableau's five types:

Field Name Sample Value Data Type Dimension / Measure
Order ID CA-2023-001 Abc Dimension
Order Date 01/03/2023 📅 Date Dimension
Category Furniture Abc Dimension
State California 🌐 Geo Dimension
Sales 1,200.00 # Number Measure
Quantity 3 # Number Measure
Returned True / False T|F Dimension

Common Data Type Mistakes to Avoid

These are the three data type errors that trip up beginners most often in Tableau:

❌ Postal Code as Number

Tableau strips leading zeros from codes like 01234, turning them into 1234. Always store postal codes as strings.

❌ Sales as Text

If Sales contains a currency symbol in the source file, Tableau reads it as text and SUM(Sales) returns zero. Remove symbols from source data or change the type to Number.

❌ Date as String

Dates stored as text cannot use Tableau's date hierarchy. You lose the ability to group by Year, Quarter, or Month. Always store dates in a recognised date format.

📌 Teacher's Note

The Discrete vs Continuous distinction is one of the concepts beginners find confusing at first — because the same field can appear as either depending on how you use it. A simple rule to remember: blue pills create headers and labels; green pills create axes and scales. When a chart does not look right, the first thing to check is whether your fields are discrete or continuous. Right-clicking a field on a shelf and toggling between the two options will often fix the issue immediately.

Practice Questions

1. A Postal Code field is being stored as a number in Tableau and losing its leading zeros. Which data type should it be changed to?

2. A green pill on a Tableau shelf means the field is being treated as which type?

3. When you drag a Date field onto the Columns shelf in Tableau, which date level does it default to?

Quiz

1. What does a blue (Discrete) field on a Tableau shelf produce in the view?


2. A field called Returned contains only the values True and False. Which Tableau data type does this field belong to?


3. How can you change a field's data type from within a Tableau worksheet without returning to the Data Source tab?


Next up — Lesson 6: Dimensions and Measures in depth — how Tableau classifies every field, and how to override its decisions when it gets them wrong.