Video | Tableau | Data visualisation | Analytics

Include Level of Detail Calculation: Tableau Functions

In this video, I take on one of the most requested videos and that is level of detail calculations specifically the Include LOD:

Part ofTableau Level of detail functionsTableau Functions
Watch on YouTube
  • The Superstore data set's grain is at the product level, not the order level, so any aggregation is really averaging individual product rows unless you change the level of detail
  • INCLUDE works in conjunction with the viz level of detail, adding a dimension to whatever is already on rows, columns and most marks (the tooltip being the exception, which uses ATTR)
  • FIXED and INCLUDE can return identical results in one context but diverge the moment you change the dimensions in the view, so you must keep asking whether the calculation still answers your question
  • FIXED can double count when its dimension doesn't align with the viz, whereas INCLUDE effectively creates a combined dimension (e.g. order ID plus subcategory) for the correct grain
  • You can nest aggregations inside INCLUDE, such as MAX(sales) per manufacturer, then take an AVG across cities, and use the summary and tabular detail views to validate what's being computed

INCLUDE is a level of detail calculation that adds a dimension to whatever's already in the view, letting you compute at a finer grain than the visualization without having to display that extra detail. Understanding it — and how it differs from FIXED — stops you getting quietly wrong answers when you change what's on the view.

Built using the Superstore sales dataset, whose actual row-level grain is per product within an order, not per order or per customer. Any simple aggregate you drop on a shelf is really averaging across that product-level grain unless you deliberately change the level of detail.

The Breakdown
  1. Know your data's real grain first 0:53

    Before writing any LOD calculation, check what a single row in your data actually represents — here it's one product line within an order, not the order itself. Every default aggregation you see is computed at that grain, so misreading it means misreading every average or sum you build.

  2. Confirm the baseline with a summary view 3:33

    Use Tableau's worksheet summary (or a simple detail table) to manually verify what a default aggregate is actually averaging or summing before you trust it. This gives you a sanity check to validate any LOD calculation you write afterwards.

  3. Write an INCLUDE to add detail beneath the view 4:19

    INCLUDE works in conjunction with the view's existing level of detail — whatever is on rows, columns and most of the marks card (tooltip aside, which uses ATTR instead). You write INCLUDE, name the extra dimension to add, then aggregate within it, so Tableau computes at view-dimension-plus-included-dimension before you take your outer aggregate.

  4. FIXED can match INCLUDE — until the view changes 8:30

    FIXED ignores the view entirely and computes independently of it, so in some contexts it happens to return the exact same number as INCLUDE. Swap a dimension in the view (region for subcategory, say) and the two diverge, because FIXED keeps aggregating at its own fixed dimension regardless of what's now on the shelf.

  5. Why FIXED can double-count 9:56

    If FIXED's dimension doesn't align with what's now in the view, it double-counts values across the newly-added dimension because it's ignorant of it. INCLUDE avoids this by effectively creating a combined grain (for example order ID plus subcategory), keeping the right totals for whichever question you're actually asking.

  6. Keep re-asking the question 14:10

    The core discipline: every time you drag a new dimension into the view, ask whether your INCLUDE or FIXED calculation still answers the same question. A calculation that was correct a moment ago can silently become wrong once the view's shape changes.

  7. Nest aggregations inside INCLUDE for layered questions 15:20

    For a more complex ask (such as finding, per manufacturer, the biggest sale, then averaging that across cities), you nest one aggregation inside another within a single INCLUDE — an inner MAX per included dimension, then an outer AVG at the view level. Use the tabular/detail view behind the summary to confirm exactly what values are feeding each stage of the calculation.

  8. Check the order of operations 23:43

    INCLUDE is computed after dimensional filters in Tableau's order of operations, which affects what data actually reaches the calculation. Understanding this ordering matters once filters are involved, even though this video keeps things simple by mostly avoiding filters.

Worth Knowing
  • The tooltip is the one part of the marks card that doesn't affect the viz level of detail — it uses ATTR instead, so INCLUDE behaves differently there than on rows, columns or other marks.
  • FIXED and INCLUDE can return identical numbers in one view and completely different ones after a single drag-and-drop change, so a match today is no guarantee of correctness tomorrow.
  • When an aggregate is built on too coarse a question (e.g. averaging just two extreme values), the result can be technically correct but not meaningful — check the row counts behind an average before trusting it.
  • INCLUDE happens after dimensional filters in Tableau's order of operations, which matters once you start filtering the view.
Use It When

Reach for INCLUDE when you need to calculate at a finer grain than what's shown in the view — for example averaging order totals or per-manufacturer maximums — without cluttering the visualization with that extra dimension.

How this Rollup was made provenance & method

A Rollup is drafted by AI from the video's transcript, then reviewed and edited by Tim. Everything used to produce this one is listed below — the model, the exact prompt, and the source video — so the process is transparent and reproducible.

Transcription
On-device — NVIDIA Parakeet v3 for recent videos, OpenAI Whisper large-v3 for earlier ones. The transcript never leaves the machine or gets published.
Drafting
Claude Sonnet 5 in the cloud, from that transcript.
Prompt
The exact Rollup prompt (v2) — the full system prompt, unedited.
Source video
Watch on YouTube
Drafted
5 July 2026 at 09:38
Reviewed & edited
11 July 2026 at 13:43 · by Tim Ngwena

Model + prompt + video is everything you'd need to recreate a Rollup like this yourself. The one thing we don't share is the transcript.

Rights. The video and its transcript are the property of TN Media Ltd. Unauthorised use or download is prohibited. © TN Media Ltd.