Skip to main content
Albero Academy

Aggregation & Granularity

How Tableau summarises data — automatic aggregation, the level of detail set by dimensions, and why the same measure changes value.

Chapter 8Tableau14 min readBeginner friendly
  • #Tableau
  • #Aggregation
  • #Granularity

A key Tableau idea that trips up Excel users: Tableau aggregates automatically. Drop Sales into a view and you get SUM(Sales), not raw rows. Understanding how aggregation and granularity interact explains why a measure shows different numbers in different views — and why LOD expressions (Chapter 2) exist.

Automatic aggregation

Measures are always aggregated in a view — SUM by default, but you can pick AVG, MIN, MAX, COUNTD and more. Tableau computes the aggregate over the rows that fall into each mark.

Granularity = the dimensions

The level of detail of a view is set by the dimensions on it. Add a dimension and each mark now represents fewer rows, so aggregates recompute at that finer grain:

dimensions control the grain
SUM(Sales) with just Region → one total per region (coarse)
Add Product to the view → one total per Region×Product (finer)
Remove all dimensions → one grand total (coarsest)
Same measure, different granularity → different numbers. This is by design.

Changing the aggregation

pick the summary
Right-click a measure pill → Measure → Average / Count Distinct / Median …
Or type it in a calc: AVG([Sales]), COUNTD([Customer ID])

Why LOD exists

Sometimes you need an aggregate at a different grain than the view — "each customer's total, shown per order". That's exactly the gap Level of Detail expressions (FIXED, INCLUDE, EXCLUDE — Chapter 2) fill: they let a calculation ignore or extend the view's granularity.

Practice

Show SUM(Sales) by Region, then add Product and watch the totals split. Change the aggregation to AVG and COUNTD(Customer). Then use a FIXED LOD to show each customer's lifetime total alongside their per-order rows.

Key takeaways

  1. 01Tableau aggregates measures automatically — SUM by default, changeable to AVG/COUNTD/etc.
  2. 02The dimensions in a view set its granularity (level of detail).
  3. 03Adding/removing dimensions recomputes aggregates — the same measure changes value by design.
  4. 04When a number surprises you, ask "which dimensions are in the view?".
  5. 05LOD expressions (FIXED/INCLUDE/EXCLUDE) compute at a different grain than the view.