Dimensions and Measures in Tableau

Dimensions and measures determine how Tableau groups, summarizes, and displays data in a visualization. Dimensions usually describe or categorize records, while measures contain values that Tableau can aggregate. This tutorial explains how dimensions and measures work, how they differ from discrete and continuous fields, and how to change a field’s role when Tableau’s default classification does not match your analysis.

For more Tableau concepts and examples, see the Tableau Tutorial.

What Are Dimensions in Tableau?

A dimension is a field used to categorize, segment, label, or provide detail for the data in a view. Dimensions commonly contain qualitative values such as customer names, product categories, regions, order IDs, and dates.

When a discrete dimension is placed on the Rows or Columns shelf, Tableau normally creates headers for its individual values. For example, placing Region on Rows can create separate headers for Central, East, South, and West.

Dimensions determine the level of detail at which measures are calculated. Adding another dimension to a view can divide an existing aggregate into smaller groups. For example, a view showing total sales by region becomes more detailed when Category is also added.

Common Tableau Dimension Examples

  • Customer Name
  • Product Category
  • Country, State, or City
  • Order ID
  • Department
  • Order Date when used as date parts such as year or month

What Are Measures in Tableau?

A measure is a field whose values can usually be measured, calculated, or aggregated. Measures commonly contain quantitative data such as sales, profit, quantity, cost, and discount.

When a measure is added to a view, Tableau applies an aggregation such as SUM, AVG, MIN, MAX, or COUNT. The aggregation is calculated at the level of detail established by the dimensions in the worksheet.

For example, if State is placed on Rows and Sales is placed on Columns, Tableau calculates sales separately for each state. The measure may appear as SUM(Sales) because SUM is the default aggregation for many numeric fields.

Common Tableau Measure Examples

  • Sales
  • Profit
  • Quantity
  • Shipping Cost
  • Discount
  • Calculated values such as Profit Ratio

Dimensions vs Measures in Tableau

The main difference is how each field contributes to the analysis. A dimension divides the data into groups, while a measure calculates a value for each group.

Tableau field roleDimensionsMeasures
Primary purposeCategorize, identify, or segment dataProvide values to calculate or summarize
Typical dataNames, categories, geographic fields, IDs, and datesSales, profit, quantity, cost, and calculated metrics
Effect on a viewDefines the level of detail and creates groupsProduces aggregated results for those groups
Typical displayHeaders when used as a discrete fieldAxes when used as a continuous field
ExampleStateSales

Sales by State Example in Tableau

Suppose a data source contains State and Sales. To compare sales among states:

  1. Drag State to the Rows shelf.
  2. Drag Sales to the Columns shelf.
  3. Tableau groups the records by state.
  4. Tableau calculates the selected aggregation of Sales for every state.

In this view, State is the dimension and Sales is the measure. Adding another dimension, such as Category, divides each state’s sales into additional groups.

Discrete and Continuous Fields in Tableau

Dimension and measure describe a field’s analytical role. Discrete and continuous describe how Tableau displays the field in a view. These are related classifications, but they are not the same distinction.

A field can therefore be a discrete dimension, a continuous dimension, a discrete measure, or a continuous measure. The result depends on the field, its settings, and how it is used in the worksheet.

Discrete Fields Create Headers

A discrete field contains separate, individually distinct values. Tableau displays a discrete pill in blue. When placed on Rows or Columns, it usually creates headers.

  • A discrete Region field creates one header for each region.
  • A discrete Year date part creates separate headers such as 2024, 2025, and 2026.
  • A discrete numeric field can create separate headers for values such as 1, 2, and 3.

Continuous Fields Create Axes

A continuous field represents values along an uninterrupted range. Tableau displays a continuous pill in green. When placed on Rows or Columns, it usually creates an axis.

  • A continuous Sales measure creates a numeric axis.
  • A continuous date creates a time axis.
  • A continuous quantity field positions marks according to their values along a scale.
Dimension and Measures in tableau

The color of a field’s pill provides a quick visual indication of its discrete or continuous state: blue indicates discrete, and green indicates continuous. The field’s placement and state determine whether Tableau draws headers or an axis.

Discrete fields in Tableau

In the discrete example, each inventory value is displayed as a separate header. The Inventory pill is blue on the Columns shelf, indicating that Tableau is treating the field as discrete.

Continuous fields in Tableau

In the continuous example, inventory values are positioned along an axis. The Inventory pill is green on the Columns shelf, indicating that Tableau is treating the field as continuous.

Discrete vs Continuous Fields at a Glance

Field behaviorDiscreteContinuous
Pill colorBlueGreen
ValuesSeparate and individually distinctPart of a range
Rows or Columns resultUsually creates headersUsually creates an axis
Typical exampleRegion or CategorySales or a continuous date

Why Numeric Fields Can Be Tableau Dimensions

Tableau normally assigns numeric fields to Measures, but not every number should be aggregated. Some numeric values are identifiers or categories rather than quantities.

Examples include postal codes, employee IDs, product codes, and rating categories. Summing these values would not produce a meaningful result, so they are often better treated as dimensions.

How to Convert a Dimension to a Measure in Tableau

You can change a field’s role when Tableau’s default classification does not match the intended analysis:

  1. Locate the field in the Data pane.
  2. Right-click the field.
  3. Select Convert to Measure to make it a measure, or select Convert to Dimension to make it a dimension.

You can also change a pill between discrete and continuous from its menu in the worksheet. Converting a field between dimension and measure changes its analytical role, while changing it between discrete and continuous changes how Tableau presents it in the view.

Tableau Dimensions and Measures FAQ

Can a measure be discrete in Tableau?

Yes. A measure can be discrete. A discrete measure is displayed as a blue pill and usually creates headers rather than a continuous axis.

Can a dimension be continuous in Tableau?

Yes. Dates are a common example. A date can be used as a continuous dimension to create a time axis, depending on the selected date option.

Why does Tableau automatically aggregate measures?

Tableau aggregates measures because a view may contain many underlying records for each combination of dimensions. The aggregation produces one summarized value, such as total sales, for each mark at the current level of detail.

Is every numeric field a measure in Tableau?

No. Tableau commonly classifies numeric fields as measures by default, but numeric identifiers and categorical codes may need to be converted to dimensions.

What is the difference between a blue pill and a green pill in Tableau?

A blue pill is discrete and typically creates headers. A green pill is continuous and typically creates an axis. Pill color does not by itself indicate whether the field is a dimension or a measure.