01 / 24

Understanding
Granularity

Master the level of detail in your data and discover why it fundamentally changes every calculation, aggregation, and visualization in Tableau.

Tableau

What Is Granularity?

Granularity (also called level of detail) describes what one row of your data represents. It answers the question: "What is the most specific thing each record tells me about?"

Fine Grain
Each row is a single transaction: one customer buying one item on one date.
Coarse Grain
Each row is a monthly summary: total sales for an entire region across all customers.

Why Granularity Matters

Granularity controls every number Tableau computes. When you drag a dimension onto a shelf, you are changing the granularity of the view, and that changes what SUM, AVG, COUNT, and every other aggregation returns.

1
Aggregations depend on it. SUM of Sales at the order level differs from SUM at the region level.
2
Joins can change it. Combining two tables may duplicate or collapse rows, silently altering your totals.
3
Visualizations reflect it. Each mark in a chart corresponds to one "grain" of the view.

The Zoom Lens Analogy

Fine Grain Order 1001, Alice, $25 Order 1002, Bob, $40 Order 1003, Alice, $15 Order 1004, Carol, $60 Order 1005, Bob, $30 5 rows = 5 orders Aggregate Coarse Grain Alice: $40 Bob: $70 Carol: $60 3 rows = 3 customers

The Core Granularity Rule

When you place Category on Columns, Tableau creates one bucket per category. If you then add Region, each Category+Region combination becomes its own bucket. More dimensions on the shelf = finer granularity = more marks.

1 Dimension Tech Furn Supply 3 marks 2 Dimensions Tech Furn Supply
6 marks (3 categories \(\times\) 2 regions)
East West

Dimensions vs. Measures

In Tableau, fields fall into two roles that directly relate to granularity:

Dimensions
Define granularity. They split the data into groups. Each unique combination of dimension values creates a separate mark. They answer "for what?"
Measures
Get aggregated. They are numbers that Tableau computes within each group. They answer "how much?" using SUM, AVG, COUNT, etc.

Row-Level vs. Aggregated Data

Row-Level (Source) Aggregated (View)
What it is Raw data before Tableau groups it Data after Tableau applies SUM, AVG, etc.
Controlled by Your data source structure Dimensions on shelves
Row count Fixed (one per record) Changes as you add/remove dimensions
Example 1 row = 1 order line 1 row = 1 region total

How Tableau Sets Granularity

Every pill you place on Rows, Columns, Color, Size, Detail, or any other shelf participates in defining the grain. Here is the order of operations:

1
Identify all dimensions on the shelves. Collect every blue pill on Rows, Columns, Pages, Marks (Color, Shape, Detail, etc.).
2
Compute unique combinations. Each distinct combination of those dimension values becomes one mark.
3
Aggregate measures within each mark. Tableau applies SUM, AVG, COUNT, etc. to the rows that match that combination.
4
Render the visualization. One mark = one bar, one point, one cell in the chart.

How to Determine Your View's Grain

1
List every dimension on the shelves. Check Rows, Columns, Color, Detail, Size, Shape, Label, and Pages.
2
Write a sentence: "One mark represents one [Dim1] + [Dim2] + ... combination." This is your grain statement.
3
Check the mark count in the status bar (bottom-left of Tableau). If it's higher than expected, you have finer grain than intended.
4
Adjust as needed. Remove dimensions to coarsen, add dimensions to refine. Move pills to the Detail shelf to split without visual separation.

Example 1: Category-Level View

$0 $50K $100K $150K $200K $183K Technology $137K Furniture $114K Supplies SUM(Sales) by Category

Example 2: Adding Region

$0 $25K $50K $75K $100K Technology Furniture Supplies East South West Central

Example 3: The AVG Trap

Imagine computing AVG(Sales). At the order level (fine grain), you average individual transactions. But if your data has been pre-aggregated to monthly totals, you are averaging averages: a completely different number.

Order-Level AVG Orders: $10, $20, $30, $40 AVG = $25
\(\frac{10+20+30+40}{4}\)
4 rows averaged ≠ Monthly-Level AVG Jan: $30, Feb: $70 AVG = $50
\(\frac{30+70}{2}\)
2 rows averaged

The Detail Shelf

Placing a dimension on the Detail shelf increases granularity without creating separate bars, colors, or axes. It's an "invisible splitter."

Without Detail
Category on Columns, SUM(Sales) on Rows. 3 marks (one per category).
With Customer on Detail
Same view but now hundreds of marks stacked on top of each other, one per Customer+Category combination.

Joins Change Granularity

Orders Order 1 | Product A | $50 Order 2 | Product A | $30 Order 3 | Product B | $70 3 rows (order-level) Returns Product A | Return 1 Product A | Return 2 2 rows (return-level) JOIN on Product Order 1, ProdA, $50, Return 1 | Order 1, ProdA, $50, Return 2 Order 2, ProdA, $30, Return 1 | Order 2, ProdA, $30, Return 2 | Order 3, ProdB, $70, null 5 rows! Orders duplicated → SUM(Sales) inflated

LOD Expressions: Overriding the Grain

Tableau's Level of Detail (LOD) expressions let you compute aggregations at a granularity different from the view. They break free from the dimensions on the shelves.

FIXED
Computes at exactly the dimensions you specify, ignoring the view grain.
INCLUDE
Adds a dimension to the view grain, computing at a finer level.
EXCLUDE
Removes a dimension from the view grain, computing at a coarser level.
// Total sales per customer, regardless of view
{FIXED [Customer Name] : SUM([Sales])}

Common Mistakes

✕ Ignoring Duplicate Rows
Joining tables without checking if the join creates row duplication, silently inflating SUM and COUNT.
✕ Averaging Averages
Computing AVG on pre-aggregated data gives a different result than AVG on raw rows. The grain must match your intent.
✕ Forgetting the Detail Shelf
A dimension on Detail invisibly splits marks. Your chart looks unchanged but tooltips and calculations silently break.

Granularity Cheat Sheet

Action Effect on Grain Result
Add dimension to shelf Finer More marks, smaller aggregations
Remove dimension from shelf Coarser Fewer marks, larger aggregations
Dimension on Detail Finer More marks, no visual change
FIXED LOD expression Independent Computes at specified grain
Join (one-to-many) Finer (often unwanted) Duplicated rows, inflated totals
Data blending Controlled Grain set by linking fields

Key Takeaways

1
Granularity is the foundation. Every number in Tableau depends on what one row represents in the view.
2
Dimensions define the grain. More dimensions = finer grain = more marks = smaller aggregated values.
3
Always state your grain. Before building a viz, write: "One mark = one [X] + [Y] combination."
4
Watch for join side-effects. Joins can silently change row count and corrupt aggregations.
5
LOD expressions give you control. Use FIXED, INCLUDE, and EXCLUDE to compute at exactly the grain you need.

Let's Test Your Understanding

The next 5 questions will check your conceptual understanding of granularity in Tableau. Focus on what changes when dimensions are added, removed, or computed at different levels.

Question 1 of 5

You have Category on Columns and SUM(Sales) on Rows, producing 3 bars. You then add Region to the Color shelf. What happens to the number of marks?

Question 2 of 5

A dataset has 1,000 individual order rows. You build a view with only SUM(Sales) on Rows and nothing on Columns. How many marks does Tableau show?

Question 3 of 5

You join an Orders table (100 rows) with a Returns table where some products have multiple return records. After the join, you notice SUM(Sales) is higher than expected. What is the most likely cause?

Question 4 of 5

What does the Tableau LOD expression {FIXED [Customer] : SUM([Sales])} compute, and how does it relate to the view's granularity?

Question 5 of 5

You place Customer Name on the Detail shelf (not on Rows or Columns). Your bar chart looks identical but now has 793 marks instead of 3. Which statement is true?