Parameter Drill Down in Tableau

by Skomantas Tamulaitis

There are two ways to create drill downs in Tableau. One way is to use sets and the other is to use parameters. Here I will outline the steps involved in creating drill downs with parameters.

In our case we will be using Sample Superstore data set and we will try to drill down from Category into Sub-Category.

Step 1
Drag Category onto rows and Sales onto columns.

Step 2
Create a Category parameter that is going to be updated using worksheet actions. Select data type as string, leave remaining fields unchanged, and press OK.

Step 3
At the top of the window go to Worksheet > Actions > Add Action > Change Parameter…
From there give your action a name like “Category Parameter Update”.
In “Source Sheets” field select the worksheet that you are working with, and leave “Run action on” on “Select”.
Under “Target Parameter” field select your parameter titled “Category Param”. Under “Source Field” select “Category – Sample Superstore” or whichever data set you are working with. Finally, click “Set value to” and leave the field under it blank. Click OK and your parameter action is set.

Excellent! Now if you right click your parameter and select “Show Parameter” you will be able to see how it updates when you select different categories.



Step 4
Create a calculated field and name it “Sub-Cat Drill Down” and enter the following statement:
IF [Category] = [Category Param] then [Sub-Category] ELSE "" END


This expression essentially says that if the category is equal to category parameter then we would like to see sub-categories, in any other case we want to see blank space.

Step 5
Now drag this “Drill Down Param” calculated field onto rows next to Category and voila, here is your parameter drill down!

Avatar

Skomantas Tamulaitis