Understanding Data Types and Roles

RELATED ARTICLES

Product(s):  Tableau Public, Tableau Desktop
Version(s):  5.2, 6.0, 6.1
Last Modified Date:  19 Jan 2012
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. In the picture, the Customer Name field has an Abc icon, indicating that it is a String data type.

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. Right-click the field in the data window.
  2. Select Change Data Type, and then select the new 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 classifies 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.

User-added image

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 a measure to a dimension:

  1. Right-click the field in the data window.
  2. Select Change Data Type and then select the new data type.
User-added image

Note: You can do the same to convert dimensions to measures; drag the dimension to the Measures pane. You can also make this conversion by right-clicking the field and selecting Convert to Dimension or Convert to Measure.

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 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:

  • Click and drag the measure field to the Dimensions pane

    OR

    User-added image

    • Right-click a discrete field in the Data window and select Convert to Continuous.
    • Select Continuous on the field menu of a discrete field in the view.
Alternate Search Terms: Information Dashboards Formatting
Need more help? Contact Support


ATTACHMENTS





Search Knowledge Base