Understand Field Type Detection and Naming Improvements
Tableau uses a collection of commonly used patterns to detect and transform your data to make it easier for you to interact with. For example, when you work with fields in the Data pane, Tableau takes the data from your data source, detects its type, and divides it into dimensions and measures.
Note: Tableau never changes your underlying data.
Tableau can also detect fields that should be treated as dimensions and clean up field names by making them more readable. You see these improvements only when the field names, which come from column headers in your data source, meet the patterns or conditions described below.
New fields added to underlying data
If you add new fields to your underlying data, and then refresh the data source in Tableau, the newly added fields will retain their original database names. If you would like Tableau to automatically rename those fields, you will need to create a new connection to that same data source.
If you prefer to maintain the field types and field names from the underlying data, see the Undo changes made by Tableau section at the bottom of this article.
Fields that are treated as a dimension
Field names that contain certain keywords are treated as dimensions, even if the values for those fields are numeric.
Keywords Code, Key, and ID
Field names that contain the following keywords and meet the conditions listed are treated as dimensions instead of measures.
- Contains keywords Code, ID, or Key.
- Keywords are either separated from other text in the field name by non-letter characters, all capitalized, or the first letter is capitalized in a field name that otherwise has mixed casing.
- Keywords are at the beginning or end of the field name, with leading or trailing non-letter characters. In Chinese, Japanese, and Korean, the key word must be located at the end of the field name.
|English (UK and US)||Code, Id, Key|
|Chinese (Simplified and Traditional)||Id|
|Portuguese||Chave, Código, Codigo, Identificação, Identificador|
Keywords Number, Num, and Nbr
Field names that end with Number, Num, or Nbr are treated as a dimension instead of a measure. For example, “Record Number” is treated as a dimension but “Number of Records” is not. In addition, the Korean field name must be four or fewer characters long.
|English (UK and US)||Number, Num, Nbr|
|Chinese (Simplified and Traditional)||-|
Keywords related to dates
Field names containing keywords that are recognized as date parts are treated as dimensions. These field names can only contain only one additional word unrelated to dates to qualify. For example, “Fiscal Year” is treated as a dimension but “Fiscal Year Information” is not. In addition, Chinese field names must be four or fewer characters long and cannot contain digits. Japanese and Korean field names must be four or fewer characters long.
|English (UK and US)||Year, Yr, Day, Day of Week, Week, Wk, Month, Quarter, Qtr, FY|
|Chinese (Simplified and Traditional)||年, 月|
|French||Annee, Année, Jour, Mois, Semaine|
|German||Jahr, Monat, Woche|
|Portuguese||Ano, Dia, Semana, Mês, Trimestre|
|Spanish||Año, Ano, Día, Dia, Mes, Semana, Trimestre|
Field name clean-up
Field names that contain specific characters or capitalized in a certain way are renamed. Field values that include square brackets are automatically converted to parentheses.
Field names with underscore and space characters
Non-leading and trailing underscore (_) characters in field names are converted into space ( ) characters. Carriage return or line feed characters in a field name are removed. However, field names that contain leading underscore characters remain unchanged. In addition, leading and trailing spaces in field names are removed. This type of field name clean up applies only to English, French, German, Portuguese, and Spanish languages.
Example 1: The field name “Country_Name” is converted to “Country Name”.
Example 2: The field name “_Days_On_Market” is converted to “_Days On Market”.
Field names with multiple underscore characters in a row remain unchanged. For example, “Country__Name” remains as “Country__Name”.
Field names and capitalization
Field names that use all capital letters with non-letter characters are converted to all lower-case letters except for the characters immediately after the non-letter character.
Additionally, field names that use all lower-case letters are converted so the first letter in the field name is capitalized.
This type of field name clean up applies only to English, French, German, Portuguese, and Spanish languages.
Example 1: The field name “PC1” is converted to “Pc1.” The field name “COUNTRY_NAME” is converted to “Country Name”. However, “Budget COGS” remains as “Budget COGS” .
Example 2: The field name “FDA” does not change. However, the field name “FDA_Sales” is converted to “Fda Sales”.
Example 3: The field name “age” is converted to “Age”.
Space characters are added to the case boundaries of field names that contain mixed casing with non-letter characters.
Example: The field name “ThisCase” is converted to “This Case”.
Field names that are two or three letters long
Field names that are two or three letters long that are part of a multiple word phrase are converted so that each letter in the word is capitalized, unless the two or three letter word contains a vowel (i.e., a, e, i, o, or u).
Example:The field name "Unit Qty" is converted to "Unit QTY". However, the field name "Sales Amt" remains as "Sales Amt".
Several three-letter acronyms are converted to all uppercase. Examples of three-letter acronyms include the following:
The following field names are converted to all lowercase letters unless the name occurs at the beginning of the field name:
|1st||as||down||of||th (suffix following a number)|
Note: The casing of field names that are one letter long remain unchanged.
If you prefer to maintain the field types and field names specified by the underlying data, you can undo changes made by Tableau either manually, at the data source level, or automatically, at the application level.
To undo changes manually
- Open your workbook and go to the Data Source page.
Click the metadata grid button.
Press Ctrl+Click (Windows) or Command+Click (Mac) to select the rows with changes you want to undo.
Click the drop-down arrow for one of the rows selected, and select Reset name.
To automatically undo changes made by Tableau at the application level, follow the procedure in the Overriding Automatic Field Renaming article. This method affects all data sources that you access from Tableau Desktop.