Tableau Course
Parameters — Basics
A parameter is a workbook-level variable that a viewer can change using a control card. Unlike a filter — which removes rows — a parameter passes a value into a calculation, a reference line, or a Top N setting, letting the viewer dynamically control the logic of the view itself.
Parameters vs Filters — The Core Difference
A practical example: a filter on Region set to East removes all non-East rows — the totals only reflect East. A parameter called "Selected Region" set to East passes the string "East" into a calculated field that highlights or colours East bars differently — but all regions remain visible in the chart. The distinction matters because parameters enable chart logic that filters physically cannot.
Creating a Parameter — Step by Step
Create Parameter Dialog — Mockup
Parameter Data Types and Allowable Values
| Data Type | Allowable Values Options | Typical Use |
|---|---|---|
| Integer | All, Range (min/max/step), List | Top N controls, bin size adjustments |
| Float | All, Range, List | Threshold values, percentage cutoffs |
| String | All, List (typed or from field) | Selecting which Measure to display, dimension switching |
| Boolean | True / False only | Toggle annotations, show/hide reference lines |
| Date | All, Range, List | Dynamic date cutoffs, as-of date for comparisons |
Using a Parameter in a Top N Filter
The most common beginner use of a parameter is a dynamic Top N filter — letting the viewer choose how many items to show. With a static Top N filter, showing the top 10 requires editing the filter. With a parameter, the viewer slides a control and the chart updates instantly.
Using a Parameter in a Reference Line
A reference line can use a parameter value as its position — creating a dynamic threshold line that the viewer controls. Right-click the axis → Add Reference Line → set Value to a parameter instead of a fixed number or aggregate. The reference line now moves with the parameter slider.
For example: create a Float parameter called Sales Target with a default value of 50000. Add a reference line at [Sales Target] on the Sales axis. The viewer drags the parameter control to 75000 and the reference line shifts — instantly showing which bars cross the new threshold without any calculation changes.
Parameter Control Card — Allowable Values Display
Parameters are the moment Tableau workbooks stop being static reports and start behaving like interactive applications. The key habit to build is: every time you hard-code a number into a calculation or a filter — a Top N count, a threshold value, a date cutoff — ask yourself whether that number should be a parameter instead. If the answer is yes even occasionally, make it a parameter from the start. Changing a fixed number to a parameter later requires rebuilding the calculation. The purple parameter icon in the Data pane is the signal that a viewer-controlled variable is available. Always show the parameter control card — a parameter that is not visible to viewers does nothing. The three most common beginner parameter use cases are: Top N filters, reference line thresholds, and the measure selector (a String parameter whose value is the name of a Measure, used in an IF/CASE calculated field to switch between Sales, Profit, and Quantity on the same axis). The measure selector is covered in detail next lesson as an advanced pattern.
Practice Questions
1. A new Integer parameter needs to be created for a Top N control. Where in Tableau do you start the creation process?
2. A parameter called Top N has been created but the viewer cannot interact with it. What step is missing?
3. A Float parameter called Sales Target has been created. How do you connect it to a horizontal line on a bar chart so the line moves when the viewer adjusts the parameter?
Quiz
1. A viewer changes a Region parameter from East to West. Unlike a Region filter, all four Regions remain visible in the chart. What explains this behaviour?
2. A Sub-Category filter is set to Top 5 by SUM(Sales) using a fixed number. You want the viewer to control how many items appear using a slider. What change connects the Top N parameter to the filter?
3. You want a parameter that lets the viewer choose which Measure — Sales, Profit, or Quantity — to display on the Y axis. Which parameter data type is correct for this use case?
Next up — Lesson 34: Parameters advanced — building measure selectors, dynamic titles, and calculated fields that use parameter values to transform what the view shows.