See all tips |
View as pdf
Understanding Data Types and Roles
| If you’re new to Tableau or even if you’ve been using the software for some time, you may still be struggling to understand how your data is categorized in Tableau. For example, what each of the icons means next to the fields in the Data window, why some fields are dimensions while others are measures, and why sometimes you place field in the view and you get an axis and other times you get headers (labels for each value in the field). These behaviors are all determined by the field’s data type and role. Below you’ll find a quick reference to begin understanding these classifications. Once you get the hang of it you can start creating really powerful analyses and explore the complex relationships of your data. | |||||
Here's how it works.Data TypesEach field (column) in your data source has an associated data type. For example, a field that contains Customer Names would have the String data type while a field containing Price information would have the Number data type. The data type is represented in Tableau by an icon in the Data window. |
|||||
|
|||||
| When you connect to a data source, Tableau automatically identifies the data types for each field. However, sometimes you may want to change the data type. For example, a field that contains Date/Time information is classified as a Number data type. If you are using a relational data source, you can change the data type of any field in the Data window. | |||||
|
To change the data type:
|
|||||
Dimensions and MeasuresIn addition to data types, each field also has an associated role, which controls how the field behaves when you use it in a view. The most obvious of roles is whether the field is a dimension or a measure. Tableau automatically categorizes your data based on whether it contains categorical data (dimensions) or quantitative data (measures). In general, dimensions create headers when placed in the view while measures create axes. |
|||||
|
|||||
| Again, you can easily switch any field from measure to dimension and vice-versa. For example, Tableau may categorize the Age field in survey data as a measure because it contains qualitative numbers, however, for some analyses you may want to look at each age as a category instead of along an axis. | |||||
To convert dimensions to measures:
Note: You can do the same to convert measures to dimensions; drag the measure to the Dimensions area of the Data window. |
|||||
Discrete and Continuous FieldsFinally, all fields are either continuous or discrete. Continuous and Discrete fields are represented in Tableau by color: green fields are continuous and blue fields are discrete. |
|||||
|
|||||
| Discrete field always add headers to the view while continuous fields add axes to the view. This distinction exists so you can use continuous dimensions or discrete measures in the view. For example, the views below both show profit as a function of inventory level. In the view on the left the inventory measure is shown as discrete headers: one for each value. On the right, you can see that inventory is shown along a continuous axis. | |||||
|
|||||
To convert discrete fields to continuous:
|
|||||
|
|||||






