Fancy Pop-Ups (Dynamic Zones #4)

Pop-up boxes in Tableau can be used for filters, zooms, or extra information – and more! Dynamic zone visibility makes these pop-ups even more fancy by allowing multiple objects to be shown and hidden with one click. That lets us add image layers for extra formatting and a slicker user experience.

In this post, I’ll show you how to create a fancy pop-up for filters by using multiple image layers. If you’re new to dynamic zones in Tableau, check out this intro post. If you want to learn more about the basics of creating a pop-up filter box, this post goes through the simple version.

Step 1: Create a Dashboard

I started by creating a simple chart and adding it to a dashboard. I’m using an image background for my dashboard for the style factor, but it’s not needed for the technique.

(Want to follow along? Download this tutorial workbook from my Tableau Public)

On the worksheet for the chart, I added a couple filters that I want to appear in my filter box – I’m using the superstore data set here, and added filters for year, category, region, and segment.

Step 2: Add a Show/Hide Parameter

Next, we’ll need a parameter that can be used as the show/hide controller for the popup box. This can be a simple Boolean. Since it won’t actually be visible anywhere, there’s no need for aliases.

Step 3: Button Worksheets

We will need two separate buttons for our dashboard. One will show the popup filters, and one will hide them. Each button will be a separate worksheet.

Start by creating two calculated fields.

Title the first field “Show Popup” and give it a value of TRUE. Title the second field “Hide Popup” and give it a value of FALSE. We’ll be using these fields for our parameter actions later on.

Now let’s make our first button worksheet.

I’ve titled this sheet Filter Button, and I’m going to use it for the button that pops up the filter box. Because I want this button to show the popup, I’ve added the “Show Popup” field to the columns.

Choose the Shape data type, and add the icon you want to use for your button. I’m using a filter icon from Google Fonts that I added to my custom shape repository.

Right-click the header and uncheck “Show Header” to hide the labels. Then select Format and remove the row dividing lines.

While you’re here, you can also set the fill of the sheet to none. This leaves you with a nice clean button that’s ready to use.

For the second sheet, which will hide the filter box, use the “Hide Popup” field instead, and use the icon you want to use to close the popup. Everything else here is the same.

Step 4: Filter Box

Now that all the infrastructure is set up, we can head back to our dashboard and start adding elements.

Start by adding a container with all of your filters and the “Show Filters” sheet from the last step. Make these both floating objects.

At this point, I took a screenshot of my dashboard and pulled it into Figma to create the background image for the filter box. (I like to use a screenshot so that I can lay my Figma elements on top to figure out size/proportions).

Create a rectangle that’s the correct size and shape for your filters, and format it as desired – I chose a white background, rounded corners, and dark drop shadow. Then download the rectangle as a PNG.

Now that we have our background rectangle downloaded, we can add the rest of the components to the dashboard. I’ve added a floating image object for the background rectangle (notice that the image is just the white box with rounded corners – it doesn’t cover the whole dashboard) and the “Hide Button” sheet as a floating object.

Stack all the floating pieces in the appropriate order.

Step 5: Parameter Actions

Next, we’ll add the parameter actions that make the buttons actually work.

Add two parameter actions as shown in the images above. The first one acts when the Show Button is clicked, and sets the parameter to TRUE. The second one acts when the Hide Button is clicked, and sets the parameter to FALSE.

Step 6: Trigger Dynamic Zone Visibility

Finally, we can add the dynamic zone visibility to make the whole thing actually work.

For each component of the popup box (that’s the background box, the filters container, and the close button), set “Control Visibility Using Value” to the controlling parameter from step 2.

Bonus + Clean Up

To polish up the dashboard, I edited the tooltips for the two button sheets to add a description of the button. (Make sure to also turn off the tooltip control bar).

As a bonus, let’s look at how to gray out the dashboard when the popup is open, like I showed at the start of this post.

To create this effect, make a rectangle in Figma that’s the same size as your dashboard. Set the opacity to a medium value (mine is 35%), download the rectangle, and add it to the dashboard as a floating layer.

You’ll want this to be underneath all the filter box components but above the dashboard components. Then set “Control Visibility Using Value” to the same parameter we’ve used for all the other pieces of the filter box.

Let's keep in touch! New tips, tricks, and tutorials are posted about once a week - sign up to get them straight to your inbox!

I don’t spam! Read the privacy policy for more info.

Leave a Reply

Your email address will not be published. Required fields are marked *