July 3, 2015

Next Level Popping Parameters, Part 1

Before we get started, I thought it would be good to answer the following question: What are popping parameters and why should you use them? "Popping Parameters" is a term created by The Information Lab that refers to the idea of limiting what parameters are displayed to the user based on what the user has selected.


"Popping Parameters" refers to the idea of limiting the parameters that are displayed to the user based on what the user has selected
Update 8/13/18: 
Starting in version 10.4, Tableau has changed the functionality of layout containers. This will prevent you from creating popping parameters as described in this post because you are no longer able to click on parameters underneath a layout container on Tableau server. I've created an updated tutorial for Tableau versions 10.4 and above here. Part 2 of these posts still works because the layout container does not cover the parameter using that method: https://alexkatona.blogspot.com/2015/07/next-level-popping-parameters-part-2.html 


Popping parameters allow the Tableau developer to have more control over the user experience of their dashboard, which helps to increase user adoption by making the dashboard feel more like an application and removes unnecessary filters from the dashboard until they are needed.


The methods that I’ve developed build upon the work that has been done by The Information Lab involving Popping Parameters.

The example dashboard referenced in this tutorial and embedded below was used in my tutorial about How to default your Tableau dashboard to yesterday. You may want to review that tutorial before continuing with this one. 

We will be focusing on how to simplify the user experience of a dashboard that defaults to a specific time frame (e.g. yesterday or last 7 days) and also allows for the ability to select a custom date range. The goal is to only show the custom date range parameters when the user is interested in selecting a custom date range. Part 1 of this series describes how to make horizontal Next Level Popping Parameters and Part 2 describes how to make them vertically. 



Step 1: Create a calculated field of the average of 1 named Fake sheet calc. 



Step 2: Create a new worksheet named Fake sheet and add the Fake sheet calc to both the columns and rows shelves. You can do this easily by dragging the Fake sheet calc to the columns shelf from the data pane. Then, Ctrl + Click + Drag the Fake sheet calc on the columns shelf to the rows shelf to duplicate it. This is what the result will look like:



Step 3: Format the worksheet so that it is a completely blank sheet. Right click the axes to hide the headers, remove the Grid lines and Zero lines of the scatterplot under Format > Lines, remove the borders under Format > Borders, and turn off the Tooltips. 



Hovering your cursor over the data point of the worksheet when it is on a dashboard will highlight the point even if you make it white or 100% transparency. I avoided this cursor highlighting by clicking, holding, and then dragging to the right in the scatterplot so that the point is out of the view on the worksheet. Then, I remove the zero lines under formatting. Here is what the final result should look like:



Step 4: Create the following boolean calculated field:



Step 5: Add the Fake Sheet Parameter Calc to the filters shelf and filter for True. You can show the Date Selection Parameter on the worksheet if you want to test the functionality before adding the worksheet to the dashboard. 




Step 6: On the dashboard, add a floating vertical layout container and then drag the fake sheet into the vertical layout container. Make sure that the title is turned off on the fake sheet. 




Step 7: Move the floating vertical layout container over the custom date parameters and adjust it to cover them completely. You can do this by clicking on the fake sheet while it is in the container, clicking on the down arrow in the top right of the fake sheet, and selecting "Select Layout Container" at the bottom of the menu (outlining it in blue to indicate that the container is selected). Then, click and drag the top center of the vertical layout container to move it. If needed, click the down arrow in the top right of the layout container to make sure it is moved to the front for the order of floating objects.

An important thing to note is that after you place the vertical layout container over the custom date parameters, you will be able to change the date selection parameter to see how the functionality is working, but you will not be able to select different dates on the custom date parameters on the dashboard in Tableau Desktop. This is because attempting to click on the custom date parameter values will be interpreted as a click on the vertical layout container in Tableau Desktop. Only when you publish the dashboard to Tableau Server does the functionality work as expected and allow the user to input different dates for the custom date parameters. 

Step 8: Verify that the functionality works as expected when published on Tableau Server and displays correctly across all browsers. 

You can also add a note somewhere on the dashboard about using the Pause Automatic Updates icon when the dashboard is published to Tableau Server so that both of the custom date parameters will apply at the same time instead of one at a time. 

If you do not have the ability to publish your dashboards to Tableau Server or would like to have the filters oriented vertically, please check out Part 2 of this series which discusses another variation of this method.