Adding an All Option to a Parameter Filter

by Kofi Bonsu

A Parameter is defined as a user generated value that allows the user to change the view. A parameter can also be used as a filter.

For this example the EU Superstore data set is used.

I start by putting the Country in the view.

I’ll be using Region as my filtering dimension in the parameter.

Right click on Region pill, go to create and select Parameter.

A parameter configuration pane is created, with the values in Region already populated. All that’s needed is to add an “All” value, which can then be dragged to the top of the list. Then click OK.

Another way of creating the parameter is by right clicking in the data pane and creating a new parameter. Name the parameter, change the data type to a string, then change the ‘Allowable Values’ radio button to list.

Select Region from the ‘Add from Field’, which populates the List of Values. Add an ‘All’ option in the value. Then click OK.

Right click on the new parameter and select ‘Show Parameter Control’.

Next a calculated field is needed to connect the parameter to the Region dimension. This is a pretty basic calculation.

[Region Filter]=[Region]

This is a boolean statement, returning either a true or false value.

Drag the Region calculation onto the Filter shelf, and select the True option.

Selecting the different values in the parameter filters out the rest of the option. This is because for that selected option, the calculation is True and is False for all the other options and since the True value was selected in the filter that’s all that’s being shown.

If the ‘All’ value is selected in the parameter, the view goes blank. That’s because it’s not in the Region calculation and therefore can’t return a True value.

To change this, an addition is needed in the calculation.

[Region Filter]=[Region]
OR [Region Filter]= ‘(All)’

Adding the second line of the calc will now show the ‘All’ value since the OR function is saying if the calculation is not True show all values which in this case is called ‘All’.

This should be your end result.

Dashboard Week, Day 5 US Highway Traffic

1 mins read

Fri 01 Mar 2019

Dashboard Week, Day 4. USA Drought Statistics

1 mins read

Thu 28 Feb 2019

Dashboard Week, Day 2. London Marathon Runners

1 mins read

Tue 26 Feb 2019

Dashboard Week, Day 1 - Star Wars

1 mins read

Mon 25 Feb 2019