---
schema_version: "1"
id: eb93ac6125849a64d829082637283eccaff8ec681c8cbf8ca7c6689344e2daf7
title: Data Types
collection: tableau
version: current
locale: en-gb
portal_url: https://docs.salesforce.com/tableau/current/en-gb/public/desktop/datafields_typesandroles_datatypes.md
canonical_url: https://help.tableau.com/current/public/desktop/en-gb/datafields_typesandroles_datatypes.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 996d1a445bcaf4fab0c7e6d00bccf35bed3e2e3836f2fb419db4fa91ef10fa80
description: Understand and change field data types like integer, date, and string in Tableau.
---
[Skip to main content](#main-content)

# Data Types

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 type icons in Tableau

<table style="mc-table-style: url('Resources/TableStyles/Basic-Border.css');border-left-style: solid;border-left-width: 1px;border-left-color: #000000;border-right-style: solid;border-right-width: 1px;border-right-color: #000000;border-top-style: solid;border-top-width: 1px;border-top-color: #000000;border-bottom-style: solid;border-bottom-width: 1px;border-bottom-color: #000000;margin-left: 0;margin-right: auto;" class="TableStyle-Basic-Border" cellspacing="0"><colgroup><col class="TableStyle-Basic-Border-Column-Column1" style="width: auto;"><col class="TableStyle-Basic-Border-Column-Column1" style="width: auto;"></colgroup><thead><tr class="TableStyle-Basic-Border-Head-Header1"><th class="TableStyle-Basic-Border-HeadE-Column1-Header1">Icon</th><th class="TableStyle-Basic-Border-HeadD-Column1-Header1">Data type</th></tr></thead><tbody><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1"><img src="https://help.tableau.com/current/public/desktop/en-gb/Img/symbol_text.png" style="text-align: center;" alt="Text or string values."></td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">Text (string) values</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1"><img src="https://help.tableau.com/current/public/desktop/en-gb/Img/symbol_date.png" style="text-align: center;" alt="Date values icon."></td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">Date values</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1"><img src="https://help.tableau.com/current/public/desktop/en-gb/Img/symbol_datetime.png" alt="Date and time values."></td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">Date &amp; Time values</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1"><img src="https://help.tableau.com/current/public/desktop/en-gb/Img/symbol_number.png" style="text-align: center;" alt="Numeric values."></td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">Numerical values (integer or decimal)</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1"><img src="https://help.tableau.com/current/public/desktop/en-gb/Img/symbol_bool.png" style="text-align: center;" alt="Boolean icon true."></td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">Boolean operators (relational only)</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1"><img src="https://help.tableau.com/current/public/desktop/en-gb/Img/geoicon.png" style="text-align: center;" alt="Globe icon indicating that the Geographic role has been applied to a field."></td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">Geographic values (used with maps)</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1"><img src="https://help.tableau.com/current/public/desktop/en-gb/Img/symbol_imagerole.png" alt=""></td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">Image role (used with image link URLs)</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyB-Column1-Body1"><img src="https://help.tableau.com/current/public/desktop/en-gb/Img/Schema_Viewer_Group_Cluster_Discrete_25x20.png" style="width: 25;height: 20;" alt="Schema Viewer group cluster icon."></td><td class="TableStyle-Basic-Border-BodyA-Column1-Body1">Cluster Group (used with <a href="https://help.tableau.com/current/public/desktop/en-gb/clustering.htm" target="_blank" class="xref">Find Clusters in Data</a>)</td></tr></tbody></table>

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 type dropdown with string and default options selected.](/tableau/current/en-gb/public/desktop/en-gb/Img/datatype0.png)

**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](https://help.tableau.com/current/public/desktop/en-gb/environment_datasource_page.htm).

## 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.

![A dropdown menu displays the data types for a field, with string selected.](/tableau/current/en-gb/public/desktop/en-gb/Img/datatype2.png)

## 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.

![dropdown menu with change data type selected, and the string and default sub-options selected.](/tableau/current/en-gb/public/desktop/en-gb/Img/datatype1.png)

**Note:** Sometimes the data in your database is more precise then Tableau can model. When you add these values to the view, a precision warning appears in the right corner of the status bar. See [Status Bar Information](https://help.tableau.com/current/public/desktop/en-gb/environment_workspace.htm#StatusBar).

## Mixed data types in data from files

Most columns in a Microsoft Excel, Microsoft Access, or CSV (comma-separated value) file contain values that are all of the same data type (Boolean operators, dates, numbers, or text). When you connect to the file, Tableau creates a field in the appropriate area of the 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 mixture of data types, such as numbers and text, or numbers and dates. When you connect to the file, the mixed-value column is mapped to a field with a single data type in Tableau. Therefore, a column that contains numbers and dates might be mapped as a number data type (making it a measure) or it might be mapped as 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 types of 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 of the first 10,000 rows are text values, the entire column is mapped to use the text data type.

**Note:** Empty cells also create mixed-value columns because 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-value columns introduces difficulties when analysing your data, you can do one of the following:

- Format empty cells in your underlying data source so that they match the data type of the column.
- Create a new column that does not contain the mixed values.