Advance with Assist shares quick solutions to common challenges encountered by the InterWorks Assist on-demand team.
Question: I have a parameter list, and I know Tableau can’t allow multi-select with them yet, but if I wanted to add an ALL selection, how would I do that?
Maybe someday Tableau will have the option for multi-select parameters, but for now it doesn’t exist. This client was utilizing 2020.2 and created a chart using a parameter to give their users the ability to change the trend line dimension on the fly. A filter didn’t suffice here as they needed the ability to keep the data for the other axis, so a parameter was the option chosen to meet their need.
Parameter Use in Tableau
In Tableau training, you typically follow four steps for using parameters within a visualization:
- Create the parameter
- Use the parameter within a calculation
- Use that calculation in the visualization
- Show the parameter control
With this question, the user needed to do the following to implement an ALL option.
First, add ALL as an option in the Parameter list:
Next, add logic for the ALL selection to the calculated field. The goal would be to evaluate True for ALL or another selection, so the filtering keeps everything, or the specified State selected here:
Now, use this in the view as a filter. You can see that the control is set to ALL and both States return True. Select one State in the control, and only that state evaluates to True, allowing the filtering desired to be accomplished:
This is a simple application of ALL, but it is effective in many scenarios. Hope this helps you when you need it!