Create Multiple Select Parameters in Tableau

When working with Tableau dashboards, I created parameters to apply conditional filters on the Tableau worksheet data. The issue was that, using only one parameter, I was unable to add dynamic filters to Tableau charts.

I wanted users to be able to select multiple values from parameters simultaneously, similar to how filters work. As a solution, I used multiple parameters to enable users to select more than one option within the parameters.

In this Tableau tutorial, I will explain how to create multiple select parameters in Tableau and use them in worksheets and dashboards.

Create Multiple Select Parameters in Tableau

In this example, we will use the Tableau Superstore dataset to create a bar chart that shows sales and profit for different Sub-Categories, with the Category dimension as the multiple-select parameter.

Connect Tableau to the Superstore dataset and follow the steps below to create multiple-select parameters in Tableau.

  1. First, create a parameter with a blank value. For this, click on the Data pane and select Create Parameter. Then create a parameter with the details below.
    • Enter the Name as Category Parameter.
    • Set the Data type to String.
    • Leave the Current value blank.
    • Set Allowable values to All and click OK.
Multiple select parameter in tableau
  1. Now, we will create four calculated fields. These calculations will be used to implement a multiple-select parameter.
//Category TF
CONTAINS([Category Parameter], [Category])

//Category Param Action
IF CONTAINS([Category Parameter], [Category]) 
THEN REPLACE([Category Parameter], [Category] + ",","")
ELSE [Category Parameter] + [Category] + ","
END

//True
True

//False
False
  1. Create a new sheet for the parameter list. This will be used as the selection list for Categories.

Create the new sheet using the details below.

  • Name the new sheet “Category List“.
  • Drag Category onto Rows, and Category TF onto Color
  • Then drag the Category to the Label card in Marks.
  • At last, drag Category Parameter, Category Param Action, TRUE, and FALSE to Details
How to create multiple parameter in Tableau
  1. To format the parameter list, create a new field called MIN(0) and drag it onto the Columns shelf. We can also do this by creating a calculation on the columns by entering min(0.0).
Multiple Select Parameters in Tableau
  1. Change the Marks type to Circle and change the color to white, and the border color to black.
Create Multiple Select Parameters in Tableau
  1. To adjust the axis, click “Edit Axis” and select the “Custom” option. Then select the range from 0.5 to 2.
Create a multi select parameter in Tableau
  1. To display the multi-select parameter exactly like a filter, remove the grid lines from the sheet. To do this, right-click and select Format -> Columns -> Grid Lines -> None.
Add multiple select parameter in tableau

With this, we have created the multiple select parameter for the Category dimension. Now, we will test the multi-select parameter in the visualization sheet and the dashboard.

Add Parameter Calculation to Visualization Sheet

Now, we will add the calculation Category TF to a visualization sheet to apply the multi-select parameter.

In this example, I have created a bar chart to show the sales in the Sub-category by region. By adding the Category parameter, we can filter out the records for each Category.

For example, if we select parameter values as “Technology“, then the bar chart will only show the sales of subcategories that come under the Technology category.

Now, here in the visualization sheet, draft the Category TF to Filters, then select “True and click OK.

Create a Multiple Parameter in Tableau

If the chart disappears -> go back to Category Parameter-> select Show Parameter-> type in one of the values “Furniture,” -> then reapply the filter.

Now, in the chart, we can see that the data is displayed according to the value we select for the Category Parameter.

Tableau multi select Parameter

As we can see, the multi-select parameter is working as expected and showing the results for the selected parameter value.

Add Parameter Action to the Tableau Dashboard

Create a new dashboard and include both the Category list (parameter) and sales by subcategory worksheets.

In the Dashboard, select Action -> Add Parameter Action. Then, in the Actions window, select Add Action -> Change Parameters.

Multi-select parameter in Tableau

Now, define the parameter action with the following details.

  • Name: Category Action
  • Source Sheet: Category List (parameter sheet)
  • Run Action on: Select
  • Target Parameter: Category Parameter
  • Source Field: Category Param Action
  • Aggregation: None
  • At last, click on the OK button.
Use Multiple select parameter in Tableau Dashboard

After this, we will add a filter for auto-deselect that will ensure the value deselects after clicking. For this, select Action -> Add Parameter Action -> Add Action -> Filters.

In the Add Filter Action, define the filter with the following details.

  • Name: Deselect
  • Source and Target Sheet: Category List
  • Run Action on: Select
  • Source Field: Category Param Action
  • Clearing the selection will: Show all values
  • In the Filter, select “Selected Fields“, then select Source Field as “True” and Target Field as “False
  • At last, click OK.
Filter Action for multi select parameter in tableau

Now, in the dashboard, we can show or hide the data of the categories by selecting the values in the parameter.

Use Multiple select parameter in Tableau

This way, we can create and use multiple select parameters in Tableau worksheets and dashboards.

Conclusion

In this Tableau tutorial, we have learned how to create a multiple-select parameter in Tableau. Usually, parameters in Tableau allow us to select only one value at a time; however, by using a string parameter with calculated fields and parameter actions, we can use it as a multi-select option.

In the above example, we created a parameter list sheet, connected it to a dashboard, and added actions so that users can click on categories, such as filters, and display data based on one or more selected values.

You may also like to read:

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.