Tableau Data Types

Every field in Tableau carries a data type. The type tells Tableau how to treat each value: as text, as a number, as a date, or as a location. A wrong data type produces wrong charts, so checking types is one of the first habits every analyst builds.

The Six Core Data Types

Tableau shows a small icon beside every field name. The icon reveals the data type at a glance.

Icon   | Data Type        | Example Value
--------------------------------------------------
Abc    | String (text)    | "Furniture"
#      | Number           | 1250.75
Cal    | Date             | 15-Mar-2025
Clock  | Date and Time    | 15-Mar-2025 10:30 AM
T|F    | Boolean          | True or False
Globe  | Geographic Role  | "Texas"

String

Strings hold text such as names, product codes, and categories. Tableau sorts strings alphabetically and cannot add them together.

Number

Numbers come in two forms: whole numbers (integers) and decimals. Prices and profit use decimals. Counts of items use whole numbers.

Date and Date and Time

Date fields unlock time features: automatic year, quarter, and month breakdowns, drill-down hierarchies, and trend lines. Date and Time fields add hours, minutes, and seconds.

Boolean

Booleans hold only two values: True or False. Comparison calculations such as Sales greater than 500 return Boolean results.

Why Data Types Matter

Consider a column of order dates stored as text. Tableau sees "03/15/2025" as a word, not a date. The date hierarchy never appears, and a time trend line becomes impossible.

Date stored as String:     Date stored as Date:
-------------------        ----------------------
No year breakdown          Year > Quarter > Month > Day
No continuous axis         Smooth timeline axis
Sorted alphabetically      Sorted by calendar order

Change a Data Type

  1. Click the type icon beside the field in the Data pane.
  2. Choose the correct type from the dropdown list.
  3. Confirm the field icon updates.

You can change types in the Data Source tab as well. Click the icon above a column and select the new type. This method fixes the problem at the source for every sheet in the workbook.

Geographic Roles

Tableau assigns a geographic role to fields that hold place names. Country, State, City, and Postal Code all qualify. A geographic role lets Tableau draw maps without latitude and longitude values.

Assign a Role Manually

Right-click the field, choose Geographic Role, and select the matching place type. Tableau matches each value against its built-in location database. Unrecognized values show an indicator in the lower-right corner of the view. Click the indicator to edit or fix them.

Common Type Problems

Zip Codes as Numbers

A zip code such as 02134 loses its leading zero when stored as a number. Convert the field to String, or assign the Postal Code geographic role, to keep the zero.

ID Fields as Measures

Customer IDs and order numbers often arrive as numbers. Adding them together produces meaningless totals. Convert the field to a Dimension by dragging it into the Dimensions area of the Data pane.

Mixed Values in One Column

A column holding both numbers and words confuses type detection. Tableau labels such a field as String and shows null for values it cannot convert. Clean the column in the source file for reliable results.

Data Type Conversion Functions

Calculated fields can convert types on the fly.

STR([Order ID])       -> Turns a number into text
INT([Quantity Text])  -> Turns text into a whole number
FLOAT([Price Text])   -> Turns text into a decimal
DATE([Date String])   -> Turns text into a date

Summary

Data types guide every decision Tableau makes about your fields. Check the icons after connecting to any dataset. Fix text dates, numeric IDs, and zip codes before building charts. Correct types lead to correct axes, correct sorting, and correct maps.