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 Types

Each 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.
The data type is represented by the 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:
  1. 1. Right-click the field in the data window.
  2. 2. Select Change Data Type and then select the new data type.

  3. Change the data type by right-clicking the field in the Data window and selecting Change Data Type.

Dimensions and Measures

In 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.
Dimensions create headers 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:
  • Click and drag the dimension field to the Measures area of the Data window.

  • Note: You can do the same to convert measures to dimensions; drag the measure to the Dimensions area of the Data window.
    Convert measures and dimensions simply by dragging and dropping between the different areas of the Data window.

Discrete and Continuous Fields

Finally, 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 fields are colored blue while continuous fields are colored green.
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.

Discrete fields add headers while continuous fields add axes.
To convert discrete fields to continuous:
  • Right-click a discrete field in the Data window and select Convert to Continuous.

    OR

  • Select Continuous on the field menu of a discrete field in the view.
    Right-click a field in the data window and select Convert to Continuous or select continuous on the field menu.
 

To Learn More

  • Learn more about Data Types and Roles by searching for Data Types in the Tableau Online Help.
  • Contact Tableau Technical Support at: (206) 633 3400 x2
  • Learn this trick and many more at the Tips and Tricks index. Don't forget to bookmark it.