Tableau Parameters and LOD Expressions
User inputs and level-aware aggregations
Parameters let a formula reference a user-chosen value (threshold, top N, dynamic title); LOD expressions (FIXED, INCLUDE, EXCLUDE) compute at the level you specify, independent of the view's granularity.
What you will learn
- Create and wire parameters for thresholds and top N
- Explain FIXED/INCLUDE/EXCLUDE granularity control
- Pick LOD type from the business question
What is this?
Parameters store a user-picked value (a number, a date, a string) that formulas and filters can reference — enabling 'top N', dynamic thresholds, and interactive what-if. LOD expressions (FIXED, INCLUDE, EXCLUDE, { ... }) compute aggregations at a chosen granularity instead of inheriting the view's, so you can show, e.g., each customer's lifetime value on a daily chart.
Why do you need it?
- Parameters turn static sheets into interactive explorations (change the N, the target, the zone).
- LODs answer 'at which level does the aggregation happen?' — the single most advanced Tableau question.
- Both keep business controls data-driven rather than hard-coded per sheet.
- Interviewers at the senior level anchor on LOD semantics, not just the syntax.
Mental model
A dimmer and a zoom lens
Parameters and LODs
The dimmer (parameter) lets the user re-set how much light — the threshold or N — without rewiring. The zoom lens (LOD) changes the level you're looking at — city vs country vs whole world — independent of the photo frame the dashboard shows. Lens and frame are different decisions.
How it works
- Parameters are standalone values (type, default, allowed range) referenced as [Param] in calcs and filters.
- FIXED computes the aggregation at exactly the listed dimensions, ignoring all other view fields.
- INCLUDE adds dimensions to the current view level for the scope.
- EXCLUDE removes a dimension (e.g., region sum while category is shown).
- LOD results equal the aggregate you'd expect at that level; hidden filters vs context differ per the three keywords.
LOD directions from the view's granularity.
Examples
Parameter + FIXED in one view
-- Parameter: [Top N] (integer, default 5)Top Row Flag = SUM([Sales]) >= MAX({ FIXED : RANK(SUM([Sales])) }) AND [Rank by Region] <= [Top N] Customer LTV = { FIXED [Customer ID] : SUM([Sales]) } -- LTV at customer level, -- reusable on daily rowsA top-N filter via parameter, plus a FIXED LOD that computes customer lifetime value regardless of the view's daily granularity.
In production
- An executive dashboard lets the user slide Top N for region leaderboards without editing.
- LTV is FIXED by customer and shown on every order row — one LOD feeds many views.
- A dynamic target uses a date parameter so 'period' is selectable, not hard-coded.
Best practices
- Give parameters clean names, default values and ranges; expose them with helper text.
- Choose FIXED for 'independent of the view', INCLUDE for 'add a level', EXCLUDE for 'remove one'.
- Keep LOD dimension list explicit; implicit '{ TOTAL }' is easy to misread.
- Combine parameters with LODs sparingly — each tool serves one job.
Common mistakes
- Using FIXED where INCLUDE is needed, dropping the view's appends.
- Top-N implemented with a whole-sheet filter instead of a parameter (no interactivity).
- Hard-coding 5 in five formulas instead of a single [Top N] parameter.
- Believing LODs ignore all filters — FIXED respects context filters differently than dimension filters.
Debugging tips
- LOD differs from manual chart → confirm which filters each LOD type respects.
- Top N includes the wrong rows → check the ranking is computed per partition.
- Parameter 'does nothing' → the calc references it exactly (name and case).
Interview checkpoint
Hands-on lab
- Recreate top-N with a parameter-value variable
- Reproduce FIXED (customer-level) aggregation in SQL
- Verify INCLUDE/EXCLUDE behavior conceptually
Simulate Parameters and Level-Aware Aggregation
45 min · advanced
Quick quiz
Which LOD keyword computes at the named level, ignoring all other view dimensions?
A parameter must be re-typed in every filter that should honor it.