Skip to content
Module 06 of 1245 min readMixed

Parameters — interactivity without code

User-controlled values that flow into calculations, filters, and titles. Build a single sheet that lets viewers swap metrics, time periods, scenarios.

50%

Listen along

Read “Parameters — interactivity without code” aloud

Plays in your browser using on-device text-to-speech — nothing leaves the page.

Learning objectives

By the end of this module, you should be able to:

  • 01Create a parameter and bind it to a calculated field, filter, or reference line
  • 02Build a parameter-driven 'pick your metric' chart
  • 03Recognise when a parameter is overkill vs underpowered

Parameters are the bridge between a static visualisation and an interactive analysis. A user-facing dropdown that says 'show me by Revenue / Profit / Orders' is a parameter bound to a calculated field that switches measure. The mechanism is mechanical; the user experience is night-and-day from a fixed chart.

Creating and binding a parameter

  • Right-click in the Data pane → Create Parameter. Choose data type (string, integer, float, date) and value type (list, range, all).
  • Bind to a calculation: write a calc that references [Parameters].[YourParam] and uses IF/CASE to switch behaviour.
  • Show parameter control: right-click parameter → Show Parameter Control. The dropdown / slider / text input now appears on the dashboard.

Worked example: pick-your-metric chart

text
// 1. Parameter: 'Metric to display' (String, list of values)
// Values: 'Revenue', 'Profit', 'Orders', 'Margin %'
// 2. Calculated field: 'Selected metric value'
CASE [Metric to display]
WHEN 'Revenue' THEN SUM([Sales])
WHEN 'Profit' THEN SUM([Profit])
WHEN 'Orders' THEN COUNTD([Order ID])
WHEN 'Margin %' THEN SUM([Profit]) / SUM([Sales])
END
// 3. Drag 'Selected metric value' onto Rows. Drag the Parameter Control
// onto the dashboard. User picks; the chart updates.
Single chart that becomes four. Add a parameter for time-period or geography and it becomes sixteen views with no extra work.

Dynamic parameters

From 2020.1, parameter values can refresh from data. Set 'Value when workbook opens' to a query result and you get a parameter that always knows the latest date, the current top-10 categories, etc. Before this, you had to manually update parameter values when source data changed — tedious and error-prone.

When to use parameters vs filters

  • Filter: shows or hides marks in the existing view. Affects the data being aggregated.
  • Parameter: changes WHICH calculation runs. Affects the chart structure, not just the data.
  • If the user wants 'show only 2024' — filter. If the user wants 'switch between revenue and profit views' — parameter.

Exercise

Build a Tableau view with three parameters: (1) Metric to display (Revenue / Profit / Orders); (2) Time period (Year / Quarter / Month); (3) Region filter (All / EMEA / Americas / APAC). Bind them to calculations and filters. Now you have a 36-view dashboard from one worksheet. How much real-estate did you save vs building each view separately?

Key takeaways

  • Parameters are single-value variables users control via dropdown, slider, or input.
  • Bind to calc fields and filters to build interactive sheets without code.
  • Modern Tableau has 'dynamic parameters' — values can refresh from data.
Loading progress…
LeadAfrikPublic Economics Hub