Tableau Course
Dimensions and Measures
Dimensions and Measures are the two fundamental categories Tableau uses to classify every field in your dataset — and understanding the difference between them is the single most important concept in building correct charts.
The Core Difference
When Tableau reads your data, it immediately sorts every column into one of two buckets. This classification drives everything — how fields appear on shelves, how they aggregate, and what kind of chart Tableau builds for you.
Dimensions are qualitative fields. They describe what each row is about — its category, its name, its location, its date. Tableau shows Dimensions in blue in the Data pane. When you place a Dimension on a shelf, it slices your data into groups. Examples: Category, Region, Customer Name, Order Date, Sub-Category.
Measures are quantitative fields. They hold numbers that you want to aggregate — sum, average, count, or calculate. Tableau shows Measures in green in the Data pane. When you place a Measure on a shelf, Tableau automatically aggregates it. Examples: Sales, Profit, Quantity, Discount.
A simple mental model: Dimensions answer "which group?" and Measures answer "how much?" When you build a bar chart of Sales by Category, Category is the Dimension doing the grouping and Sales is the Measure providing the height of each bar.
How Tableau Decides the Classification
Tableau makes its initial classification automatically based on the data type of each field:
| Data Type | Default Classification | Reason |
|---|---|---|
| String (Abc) | Dimension | Text cannot be summed or averaged — it can only label and group |
| Date / Date & Time | Dimension | Dates are used to group and slice data by time period |
| Boolean (T|F) | Dimension | True/False values are categories, not quantities |
| Number (#) | Measure | Numbers can be summed, averaged, and used in calculations |
| Geographic (🌐) | Dimension | Location names are categories that describe where, not how much |
Aggregation — The Key Behaviour of Measures
The most important thing to understand about Measures is that Tableau always aggregates them when you place them in a view. By default it uses SUM — but you can change the aggregation at any time.
Here is what happens with the Superstore data when you drag Sales onto the Rows shelf with different Dimensions on Columns:
| Dimension on Columns | Measure on Rows | Result in the View |
|---|---|---|
| Category | SUM(Sales) | 3 bars — one total Sales value per Category |
| Region | SUM(Sales) | 4 bars — one total Sales value per Region |
| Order Date (Year) | SUM(Sales) | One bar per year — total Sales summed across all orders in that year |
| Category + Region | SUM(Sales) | 12 bars — Sales broken down by every Category and Region combination |
Notice that the Measure does not change — only the Dimension changes. The Dimension controls how the data is sliced, and the Measure provides the value for each slice.
Changing the Aggregation of a Measure
SUM is just the default. Right-clicking a Measure on a shelf reveals the full list of available aggregations. Here are the most commonly used ones:
Adds all values in the group. Default for most numeric fields. Use for total Sales, total Revenue.
Calculates the mean across the group. Use for average order value, average discount rate.
Counts the number of rows in the group. Use for counting orders, transactions, or records.
Counts distinct values only. Use for counting unique customers, unique products, unique orders.
Returns the lowest or highest value in the group. Use for finding the earliest date or highest sale.
Returns the middle value in the group. More robust than AVG when data has extreme outliers.
Converting Between Dimensions and Measures
Tableau's automatic classification is not always correct. A classic example is Year — if your dataset has a column called Year containing values like 2021, 2022, 2023, Tableau classifies it as a Measure (because it is a number) and will try to SUM it. That is meaningless. You need to convert it to a Dimension so Tableau treats it as a category label instead.
A Visual Comparison — Same Data, Different Roles
The difference between Dimension and Measure behaviour becomes clearest when you see the same field used in both roles. Consider a column called Postal Code stored as a number:
Tableau shows SUM(Postal Code) — a meaningless number. The view shows a single bar with a sum of all postal codes added together. This is useless.
Tableau treats each postal code as a label and creates one mark per unique code. You can now see Sales broken down by Postal Code correctly.
Number of Records — Tableau's Built-in Measure
Every Tableau data source automatically includes a special Measure called Number of Records. It always equals 1 for every row in your dataset. When aggregated with SUM, it gives you the total row count. This is useful for counting orders, transactions, or any other row-level event without needing a dedicated count column in your data.
Drag it onto Rows with Category on Columns to count how many orders fall into each category. SUM(Number of Records) = total row count. It is the easiest way to count records without writing a formula.
The most common beginner mistake is dragging a number field onto the Columns shelf and getting a single bar instead of multiple bars. This happens because the number field is classified as a Measure and gets aggregated immediately. The fix is always the same: right-click the field on the shelf and select Dimension, or convert it in the Data pane before dragging. Once you build the habit of checking Dimension vs Measure before dragging, your charts will come out correctly the first time almost every time.
Practice Questions
1. A column called Year contains values like 2021, 2022, and 2023. Tableau classifies it as a Measure by default. Which classification should it be changed to so it appears as a category label?
2. Which aggregation should you use when you want to count the number of unique customers in each region?
3. Which built-in Measure does Tableau automatically add to every data source to help you count rows without writing a formula?
Quiz
1. What happens in the view when you place a Dimension on the Columns shelf?
2. How do you convert a Measure to a Dimension in the Tableau Data pane?
3. A manager wants to see the average order value per region rather than the total. Which aggregation should be applied to the Sales measure?
Next up — Lesson 7: The Visual Shelf — how Columns, Rows, Filters, and the Marks card work together to build any chart you can imagine.