Multi-Select Parameters in Tableau
Here’s a method to enable multi-select functionality for parameters in Tableau, which by default only support single selection.
When building dashboards, you might find yourself considering parameters due to the limitations of filters. For example, filters can’t be used directly inside calculations, and when working with multiple data sources, you often have to rely on data blending, which can hurt performance.
However, parameters have their own limitations, most notably their single-selection nature. This creates a dilemma where you have to choose between filter and parameter. In this post, I'll show you how to work around this by allowing multiple values to be passed to a parameter, so you can benefit from both.
Step-by-Step: Multi-Select Region Parameter
Using the Superstore dataset, we’ll create a parameter that lets you select multiple regions (West, Central, South, East) for filtering.
- Create a parameter to input the region values.
- Write a calculated field that allows multiple regions to be added or removed from the parameter. If a region is already in the parameter, this calculation removes it; if not, it appends the region with a comma separator.
- Create a boolean calculated field that filters the sheet based on the parameter values. Instead of looking for an exact match, this calculation checks whether the region is included in the parameter.
- Build a button sheet that passes region values to the parameter. Place the "Region Param" calculation on the detail shelf and use the "Region TF" calculation for color.
- Set up a filtered sheet to display data based on the parameter. Drag the "Region TF" field onto the filters shelf.
- Add both sheets to your dashboard and configure a dashboard action to update the parameter values when users click the buttons.
- Add an action to disable selection on the button.
- Finalize the dashboard and test the multi-select parameter functionality.