Parameter Actions Part 2 : Compare Values

In the last article we learned how to use parameter actions to enable chart drilldown. Today we would learn how to use a parameter to Compare Values.
Let us suppose we have sales by sub-category as under:

Now here what I would like to achieve is that if I hover on any subcategory , I am able to find out which all subcategories are having sales lower sales an which are having sales above that particular sub category.
This could have been achieved earlier using a parameter where we needed to create a parameter and use it for comparing the values , however we had to enter the parameter values manually and on top of that we should be knowing the exact value of sales across subcategory.

This problem can be easily tackled using the parameter actions in Tableau, which allow the parameter to be dynamic ie change values without user inputting them. Here is how to achieve it.

Step 1: Bring Sales in to columns and Category , Sub Category into rows to get the view that is shown in above image.

Step 2: Create a parameter for Comparing the sales value

Step 3: Create a calculated field for comparing the sales with the sales parameter as under. Once created bring this calculated filed on the color mark.

Step 4: Create a new dashboard and bring the worksheet on the dashboard. Once done click on Dashboard at the top menu and then actions. Next in the add actions , click on change parameter.


Create a parameter action as above and you are good to go. In the source sheet select the sheet that has your view. Under target parameter select the created parameter and under field the sales field that come from the database. That’s it now once you hover on any of the bar the parameter will pick up the value for that particular bar and will compare the values of others bar accordingly.

Here is an interactive version of what we did in the above step.

Hope you guys enjoyed this tutorial. Stay tuned for more tutorials on this series of Parameter actions in Tableau.

Happy Learning!!

Please follow and like us:




1 Comment

Comments are closed.