Tableau Course
Parameters — Advanced
Advanced parameter patterns turn a static dashboard into a genuinely interactive analysis tool — letting the viewer switch Measures, adjust thresholds, change chart titles, and control calculated field logic entirely through parameter controls without touching the workbook.
The Measure Selector Pattern
The measure selector is the most powerful and widely used advanced parameter pattern. A single String parameter holds the name of a Measure — "Sales", "Profit", or "Quantity" — and a calculated field uses that value in a CASE statement to return the correct Measure. One axis, one chart, three fully switchable metrics controlled by the viewer from a radio-button parameter card.
Calculated field: Selected Metric
CASE [Selected Measure]
WHEN "Sales" THEN SUM([Sales])
WHEN "Profit" THEN SUM([Profit])
WHEN "Quantity" THEN SUM([Quantity])
END
When Selected Measure = "Profit" → returns SUM([Profit]) for every row.
When Selected Measure = "Quantity" → returns SUM([Quantity]) for every row.
The chart axis, bar heights, and sort order all update to reflect the viewer's selection.
Measure Selector — Labelled Mockup
Dynamic Titles Using Parameters
A chart title can reference a parameter value directly — so the title updates automatically when the viewer changes the parameter. This prevents the common problem of a title saying "Sales by Category" while the chart is actually showing Profit.
To insert a parameter into a title: double-click the chart title to open the Edit Title dialog. Click Insert in the toolbar → Parameters → select Selected Measure. The parameter value appears as a dynamic token in the title text. The full title becomes: <Parameters.Selected Measure> by Category — which renders as "Sales by Category", "Profit by Category", or "Quantity by Category" depending on the current parameter value.
Conditional Colour Using a Parameter
A calculated field that references a parameter can also drive the Color channel — creating bars that highlight only the selected Region or Category while leaving all others grey. This keeps all data visible while drawing attention to the viewer's selection.
Calculated field: Region Highlight
IF [Region] = [Selected Region]
THEN "Selected"
ELSE "Other"
END
When dragged to the Color channel with "Selected" mapped to orange and "Other" mapped to grey, the chosen Region's bar stands out while all other bars remain visible — a highlight pattern that filters cannot replicate.
Conditional Colour Map — Labelled Mockup
Parameter-Driven Calculated Fields — Common Patterns
| Pattern | Parameter Type | Calculated Field Logic |
|---|---|---|
| Measure Selector | String — List | CASE [p] WHEN "Sales" THEN SUM([Sales]) … |
| Highlight Selector | String — List | IF [Dim] = [p] THEN "Selected" ELSE "Other" END |
| Dynamic Threshold | Float — Range | IF SUM([Sales]) >= [p] THEN "Above" ELSE "Below" END |
| Date Cutoff | Date — All | IF [Order Date] <= [p] THEN [Sales] END |
| Bin Size Control | Integer — Range | INT([Sales] / [p]) * [p] — groups Sales into viewer-sized bins |
The measure selector pattern is worth memorising completely — it appears in almost every professional Tableau dashboard. The full pattern is always the same three pieces: a String parameter with a List of Measure names, a CASE calculated field that maps each name to its Measure, and a dynamic title that shows which Measure is currently selected. Without the dynamic title the viewer cannot tell which Measure is active — this is the most common omission on real dashboards. The highlight selector pattern is equally important because it solves the problem that a filter cannot: you want to focus the viewer's attention on one Region while keeping the other Regions visible for comparison. A filter removes the other Regions entirely — comparisons disappear. A highlight selector keeps all bars visible but makes one stand out in colour. Conditional colouring driven by a parameter is the professional answer whenever a stakeholder says "I want to be able to highlight any region I click on."
Practice Questions
1. A String parameter called Selected Measure has three List values: Sales, Profit, Quantity. Write the calculated field that returns the correct Measure based on the parameter value.
2. The chart title needs to show the currently selected Measure name automatically. How do you insert the Selected Measure parameter value into the title text?
3. A String parameter called Selected Region holds one Region value. Write the calculated field that returns "Selected" for the matching Region and "Other" for all remaining ones, to be used on the Color channel.
Quiz
1. A dashboard uses a measure selector parameter and a CASE calculated field on the Y axis. The viewer selects Profit but the title still reads "Sales by Category". Which of the three components of the full measure selector pattern is missing?
2. A stakeholder wants to focus on one Region at a time but also needs to see all other Regions for comparison. A filter removes the others entirely. Which parameter pattern solves this correctly?
3. A histogram needs its bin size to be viewer-controlled — the viewer should drag a slider to group Sales into bins of 500, 1000, or 2000. Which parameter type and calculated field pattern handles this?
Next up — Lesson 35: Basic calculations — writing your first calculated fields using arithmetic operators, string functions, and date functions to create new Measures and Dimensions.