The difference between parameters and filters

Throughout my application process, I was constantly looking for ways to enhance my viz. After visiting multiple videos, blogs, and tools, I found two standout functions:

  1. Filtering data
  2. Adding parameters

Taking a shallow dive I quickly became very confused regarding the differences between the two; as they both looked quite similar. Well, this week our coach Bethany took us through the uses of each function, and I have a much better understanding of the two now which I will be sharing today.

What is the difference?

Well, at a basic level, a filter allows you to restrict values to present a concise, insightful, and relevant dashboard to the user. This means the user can only see and interact with what values you want them to see. This is a very useful process to remove any clutter or any fields that do not assist in adding value to your story (for example removing null values).

Whereas parameters enhance the user interaction by providing a range of options for the user to choose from. This is an important tool as it allows the users to choose the charts they would like to investigate. What’s important to note here is that by choosing one option does not remove the other options from the view.

Let’s go through the uses:

I will be using the superstore data set which can be found on the tableau work page.

Filtering data

So, we can drag sub-category to the rows and the discount to the columns and change the measure from sum to average as so.

 

Say we wanted to restrict the discount amount, so that the maximum discounts we can give out is capped at 20%. So we want to investigate which of our sub-categories exceed this limit. For this example, we want to conduct an analysis on all the sub-category types that have an average discount greater than 0.2 (or 20%). That’s all we want our users to be able to view.

So, drag the sub-category to the filter, above the marks card. When we do that, we get this pop-up box that is asking us how we want to filter our data. So, we have a couple of different tabs, we want to use the condition tab, select the by field button.

We are saying that we want to filter our Discount, by the Average, which is > 0.2

 

As we can see we have restricted the view so that the user can only see the categories that have a discount amount higher than 20%.

Creating Parameters

Whereas with a parameter, we want our user to be able to see both the sub-categories including discount amounts greater than 20% as well as the ones that are less than or equal to 20%. But we want the user to be able to distinguish between the two by changing the view based on the option they select.

 Let’s see how we can do this

We select create a parameter, name the parameter, select the data type as string. Then go down to the allowable values and select list and type the list of values as what you want the user to see and click ok.

 

Then we need to create a calculated field, so tableau know what we want to do what that parameter. Then we bring that bring that calculated field to filter and select true.  This step is to ensure we only see the true values of that calculation when we select the parameter option. Final step now, we go down to the parameters section, left click the select a measure parameter and click show parameter.

 

There we have the differences! I hope this helps.

Kavita Nand
Author: Kavita Nand