Data Types (2024)

All fields in a data source have a data type. The data type reflects the kind of information stored in that field, for example integers (410), dates (1/23/2025) and strings ("Belgium"). The data type of a field is identified in the Data pane by one of the icons shown below.

Data typeicons inTableau

Icon Data type
Data Types (1) Text (string) values
Data Types (2) Date values
Data Types (3) Date & Time values
Data Types (4) Numerical values
Data Types (5) Boolean values (relational only)
Data Types (6) Geographic values (used with maps)
Data Types (7) Image role (used with image link URLs)
Data Types (8) Cluster Group (used with Find Clusters in Data(Link opens in a new window))

You can change the data type for a field either on the Data Source page or in the Data pane.

Change the data type for a field in the Data Source page

Sometimes Tableau incorrectly interprets the data type of a field. For example, Tableau might interpret a field that contains dates as an integer data type, rather than a date data type.

You can change the data type for a field that was part of the original data source (as opposed to a calculated field created in Tableau) on the Data Source page.

  1. Click the data type icon for the field (as shown in the table above).

  2. Choose a new data type from the drop-down list:

    Data Types (9)

Tip: Be sure to change data types before you create an extract. Otherwise, your data may not be accurate. For example, if a floating-point field in the original data source is interpreted as an integer by Tableau, and you create your extract before you change the field's data type, the resulting floating-point field in Tableau will have some of its precision truncated.

For information on changing data types on the Data Source page, see Data Source Page.

Change the data type for a field in the Data pane

To change the data type of a field in the Data pane, click the icon to the left of the field name, and then choose a new data type from the drop-down list.

Data Types (10)

Change the data type for a field in the view

To change a field's data type in a view, right-click (control-click on a Mac) the field in the Data pane, choose Change Data Type, and then select the appropriate data type from the drop-down list.

Data Types (11)

Note:Sometimes the data in your database is more precise thenTableau can model. When you add these values to the view, a precisionwarning appears in the right corner of the status bar. See Status Bar Information.

Mixed data types in data from files

Mostcolumns in a Microsoft Excel, Microsoft Access, or CSV (comma-separated value) file containvalues that are all of the same data type (Booleans, dates, numbers, or text). When you connectto the file, Tableau creates a field in the appropriate area ofthe Data pane for each column. Dates and text values are dimensions, and numbers are measures.

However, files that you connect to might include columns that have a mixtureof data types, such as numbers and text, or numbers and dates. Whenyou connect to the file, the mixed-value column is mapped to a fieldwith a single data type in Tableau. Therefore, a column that containsnumbers and dates might be mapped as a number data type (making it a measure) or it might be mappedas a date data type (in which case Tableau treats it as a dimension.)

Tableau determines how to map mixed-value columns to data types by the data typesof the first 10,000 rows in an Excel data source, and the first 1,024 rows in a CSV data source. For example, if most ofthe first 10,000 rows are text values, the entire column is mappedto use the text data type.

Note:Empty cells also create mixed-value columnsbecause their formatting is different from text, dates, or numbers.

When Tableau determines a data type for each field, if the values in a field don't match that data type, Tableau handles the field in one of several different ways, depending on the data type. For example, sometimes Tableau populates those fields with Null values, as shown in the following table:

Mapped data type Treatment of other data types in the field.
Text Dates and numbers are treated as text. Nulls are not created.
Dates Text is treated as Null. A number is treated as the day in numeric order from 1/1/1900.
Numbers Text is treated as Null. A date is treated as the number of days since 1/1/1900.
Boolean Text, dates, and numbers are treated as Null.

If using fields that are based on mixed-valuecolumns introduces difficulties when analyzing your data, you can do one of the following:

  • Format empty cells in your underlying data source so that theymatch the data type of the column.

  • Create a new column that does not contain the mixed values.

Data Types (2024)
Top Articles
Latest Posts
Article information

Author: Lakeisha Bayer VM

Last Updated:

Views: 6255

Rating: 4.9 / 5 (49 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Lakeisha Bayer VM

Birthday: 1997-10-17

Address: Suite 835 34136 Adrian Mountains, Floydton, UT 81036

Phone: +3571527672278

Job: Manufacturing Agent

Hobby: Skimboarding, Photography, Roller skating, Knife making, Paintball, Embroidery, Gunsmithing

Introduction: My name is Lakeisha Bayer VM, I am a brainy, kind, enchanting, healthy, lovely, clean, witty person who loves writing and wants to share my knowledge and understanding with you.