MIP Logo

Selecting ‘All’ values using a parameter in tableau

This post was originally published on The Data School blog between 2018 and July 2025, before our program was renamed to MIP’s Analytics Career Accelerator. References throughout this article to “The Data School” or “DS” all refer to what is now MIP’s Analytics Career Accelerator. The program, its people, and its commitment to launching outstanding analytics careers remain the same – just under a new name.

If you are having trouble viewing this article, please report it here

Parameters can be used as filter in tableau. However , we can only select one value at a time. Recently I had a requirement to filter months using parameter. I needed to select individual months and also ‘All’ months.

Below are the steps to achieve this.

Create parameter [Month]. include ‘All’ in Values

.

Create a calculation to compare the selected parameter to the date field on which you need to apply the filter on.

case [Month]
when ‘All’ then MONTH([date_field]) in (1,2,3,4,5,6,7,8,9,10,11,12)
when ‘January’ then MONTH([date_field]) =1
WHEN ‘February’ then MONTH([date_field])=2
WHEN ‘March’ then MONTH([date_field])=3
WHEN ‘April’ then MONTH([date_field])=4
WHEN ‘May’ then MONTH([date_field])=5
WHEN ‘June’ then MONTH([date_field])=6
WHEN ‘July’ then MONTH([date_field])=7
WHEN ‘August’ then MONTH([date_field])=8
WHEN ‘September’ then MONTH([date_field])=9
WHEN ‘October’ then MONTH([date_field])=10
WHEN ‘November’ then MONTH([date_field])=11
WHEN ‘December’ then MONTH([date_field])=12 END

Drag this calculation to the filter card and set as true. Now you can use the parameter[Month] in dashboard and  use it as a filter.

 

 

 

Share this post