Take Action! (With Parameters)

The most common type of interactivity implemented in dashboard visualizations is the humble filter, with which users can change the scope of the visualization by selecting relevant values.

However, filters are slow and while they are easy to use, they do not allow users to dynamically change the dashboard view through direct interaction with the viz itself. This is where parameter actions come in as a quick and effective way to interact with the viz and break down what we are looking at quickly. It also looks cool!

Let’s assume we want to be able to see total sales by category and when we click one of the bars we can drill down to see the sales of sub-categories in that category.

Starting with a basic chart of sales by category…


…we can take our first step by making a parameter from the category field so that we may be able to switch and select category by category.



First we’ll start by selecting the category field, right clicking it and creating a parameter.


As our category date is in the form of words, we must change the data type to string so that Tableau will know what it’s looking for. As Furniture is our first category we’ll select that as our current value and just to make sure what categories we are switching to and from we can make it a list and input each one. (Note that you can select ‘All’ for allowable values; however I personally prefer to use lists to make sure I am seeing exactly what I intend to be interacting with).


Now that we have made the parameter we must make a calculation that recognizes the parameter for what it is so that we can implement it on the dashboard. In this case the calculation is saying that if the category is equal to a specifically selected category (ie. Category = Furniture) then to show all subcategories in that category, else do not return a value.


Now that we have made a calculation, we need to make an action so that we can directly interact with the visualization itself. Since we are creating a parameter action, we want to tell the worksheet to change the parameter so that is the type of action we will select.


Once we do that we are brought to this window where we can edit the configuration of the action. Name it something relevant and then under Source Sheets make sure that it is targeting the sheet you want to place the action on. The Target Parameter is the parameter that we have just created and the Source Field is the original category field. Once implemented we can now add them all together and…


Action! When we click on one of the category bars we can now drill down to the subcategory level!

Author:
Christian Vincent Curcurato
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab