Filter with Parameters: Adding ‘All’ option to filter by all values

Joti Gautam
2 min readFeb 2, 2022

--

Recently I encountered a problem in a dashboard where I was using parameter to filter sheets but I had to show all values as well just like normal dimension filter does. Here is the solution used:

Suppose we have a dashboard as shown below where we are using Superstore data.

Here we want to highlight the selected product name when doing a click through from the sheet, so we are using parameter for product name. But we also want to give user the flexibility to select the product name directly instead of scrolling through the sheet, so side drop down filter also provided. But what if we want to see total sales for all the products. Normally parameter doesn’t contain the option but we can manually do that following below steps:

  1. Create the product parameter with data type ‘String’ and Allowable values as ‘List’. Once the values are added, manually enter one more value and name it as ‘All’

2. Create a calculated field with following function:

[Product Name Parameter]=[Product Name] or [Product Name Parameter] = ‘All’

3. Use this calculated field as a filter in sheets to be filtered based on the parameter and turn its value to ‘True’

Now when you try to filter by value ‘All’, all the products will be shown.

You can go to the below Tableau Public link to try the function and also can download the workbook to follow along.

https://public.tableau.com/views/Filterbyparameters/Dashboard1?:language=en-US&:display_count=n&:origin=viz_share_link

I hope it was helpful.

See you next time!

--

--

Joti Gautam
Joti Gautam

Written by Joti Gautam

Passionate about data | Pushing my limits each day to learn more

Responses (1)