Tableau Lesson 33 – Parameters Basics | Dataplexa
Section IV — Lesson 33

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

Filter
Removes rows from the dataset. The viewer selects which values to include or exclude. The chart changes because different rows are being aggregated. The calculation logic stays fixed.
Parameter
Passes a value into a calculation. No rows are removed. The chart changes because the calculation logic itself changes based on the parameter value. All data remains in the view.

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

1
In the Data pane, click the dropdown arrow at the top-right and select Create Parameter. Alternatively, right-click any empty space in the Data pane and select Create Parameter. The Create Parameter dialog opens.
2
Name the parameter Top N. Set Data Type to Integer. Set Current Value to 5. Under Allowable Values, select Range and set Minimum to 1, Maximum to 20, and Step Size to 1. Click OK. The parameter appears at the bottom of the Data pane with a purple icon.
3
Right-click the Top N parameter in the Data pane and select Show Parameter. A slider control card appears on the worksheet. The viewer can now drag the slider to set a value between 1 and 20. The parameter's current value is accessible in any calculated field as [Top N].

Create Parameter Dialog — Mockup

Create Parameter Dialog
Name
Top N
Data Type
Integer ▾
Current Value
5
Allowable Values
Minimum
1
Maximum
20
Step Size
1
Cancel
OK

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.

1
Create the Top N Integer parameter as described above (range 1–20, default 5). Show the parameter control card on the worksheet.
2
Drag Sub-Category to the Filters shelf. On the Top tab, select By Field → Top, set the count field to the Top N parameter (not a fixed number), and the Measure to SUM(Sales). Click OK.
3
Drag the parameter slider from 5 to 10. The chart immediately updates to show the top 10 Sub-Categories. Drag to 3 — only the top 3 remain. The filter is now fully dynamic and viewer-controlled without any workbook editing required.

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

Parameter Control Cards — Three display styles
Top N
1520
Range — slider
Sales Measure
List — radio buttons
Sales Target
50,000
Type a value
All — type-in box
📌 Teacher's Note

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.