Tableau Lesson 34 – Parameters Advanced | Dataplexa
Section IV — Lesson 34

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.

1
Create a String parameter named Selected Measure. Set Allowable Values to List and add three entries: Sales, Profit, Quantity. Set Current Value to Sales. Show the parameter control — it appears as a radio-button list.
2
Create a calculated field named Selected Metric. The field uses the parameter value to return the correct Measure. Place this calculated field on Rows in place of a fixed Measure — the axis now reflects whichever Measure the viewer selects.
3
Show the parameter control card. Clicking Profit in the radio list immediately switches the entire chart — axis label, bar heights, sort order — to show Profit. No filters changed, no rows removed. The parameter value drove a calculation change.

Calculated field: Selected Metric

CASE [Selected Measure]
  WHEN "Sales"    THEN SUM([Sales])
  WHEN "Profit"   THEN SUM([Profit])
  WHEN "Quantity" THEN SUM([Quantity])
END

Measure Selector — Labelled Mockup

Measure Selector — Parameter card (left) controls the bar chart axis (right)
Selected Measure
SUM(Selected Metric) — Profit selected
$K $41K Tech $32K Off.Sup $23K Furn Axis = Profit ← driven by parameter

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

Conditional Colour Map — Labelled Mockup

Region Highlight — Selected Region parameter = "West" · All regions visible
Selected Region
$342K Central $428K East $292K South $392K West ★ All regions visible · West highlighted via parameter

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
📌 Teacher's Note

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.