Back to Advanced Tools

INCLUDE & EXCLUDE LOD Expressions

Extend your FIXED LOD knowledge with INCLUDE and EXCLUDE Level of Detail expressions -- understand LOD syntax as a way to 'zoom in' or 'zoom out' from the current view's granularity, and troubleshoot the common 'cannot mix aggregate and non-aggregate' error.

12 minutesVideo LessonPDF notes
🎯 Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.

Ready to continue?

Mark this lesson as complete when you're ready to proceed.

Key moments

  1. LOD Mental Model — Introduces the camera lens analogy for zooming into details or zooming out for bigger-picture totals.
  2. Three LOD Types & Syntax — Outlines FIXED, INCLUDE, and EXCLUDE behaviors and details the mandatory curly brace and colon syntax.
  3. Single & Multi-Dimension FIXED — Demonstrates category and category-region sales calculations that remain unaffected by sub-category filters.
  4. INCLUDE LOD Mechanics — Calculates average sales per product inside a category view and shows how sheet filters affect the results.
  5. EXCLUDE LOD Implementation — Removes the region dimension to display category totals and contrasts its filter sensitivity against FIXED.
  6. Percent of Total & Error Fix — Resolves mixed-aggregation errors using a table-scoped LOD to calculate category percent of total sales.
PDF notes

Frequently asked questions

Why does FIXED Category Sales show the same number when a Sub-Category is filtered out?

FIXED expressions are evaluated before standard dimension filters in Tableau's order of operations, rendering them immune to chart-level filter exclusions.

What is the mathematical difference between AVG(Sales) and an INCLUDE AVG(Sales) LOD?

Standard AVG(Sales) averages every underlying raw transaction row, whereas INCLUDE averages the sales per specified dimension first and then averages those group results.

When should I use EXCLUDE instead of FIXED?

Use EXCLUDE when you want to remove a specific dimension from the calculation while ensuring the computed total still reacts dynamically to other active sheet filters.

How was this lesson?

Your feedback helps us refine explanations and catch bugs.