Show/Hide Button in Tableau

Overview

Everyone working with data and data visualization will experience clutter at some point in time. Things on your dashboard may look messy, and the worst part is that you won’t be able to do anything since all of them are essential to support the overall concept of the dashboard. In other words, clutter is a necessary evil that all analysts encounter. Many analysts want to be able to take a single visualization and adjust it to the deepest level of need. Providing a high level of freedom to the end-user is something that is highly appreciated. 

But unfortunately, parameters, legends, and similar features on Tableau are space-greedy and work against you, in a way. Using them carelessly can leave them devouring up your visualization space.  If the parameters are part of the tiled background, they can squish a visualization or get pushed up near the top. A floating container is also an option, but those too can look messy. The tricky part is that there might not be a place to place them permanently where you will be sure that they won’t obstruct the visualization. 

man wearing black suit jacket and pants
Deliver Impressive Tableau Analytics with Key Practices

But now, there is a way to avoid the clutter.

As of May 2019, within version 2019.2, Tableau has introduced a feature that solves this problem easily and effectively – Show/Hide Buttons. This feature has a pretty self-explanatory name itself – they can hide floating containers on a dashboard, allowing you to switch their appearance. In other words, the end-user can show a floating container if he needs to use it, but otherwise, it can be hidden as a way for the dashboard to look cleaner. This makes this feature incredibly handy since it keeps the data nice and organized. 

In this article, we will take some time to go step by step on how you can make these buttons, how you can customize them, and what exactly they can do. The power of this new utility is more than obvious to people who enjoy a well-organized dashboard, so we want to remove any unclear details that may confuse those who plan on using them in some future dashboard. 

How Can You Create a Show/Hide Button on Tableau?

The first thing we need to do is create a Show/Hide button. If you want to make one as part of your dashboard, look in the bottom left of the screen. There you have multiple Object options. Even though the option Button Object seems like a reasonable choice, if you want to create a Show/Hide button properly, you need to start by dragging either the Vertical or Horizontal Object onto the screen while the Floating is selected. As a result, you will see an empty container.

Now since you have the empty container, you can drag any parameters, sheets, filters, or basically anything that you want to hide into this container. Note that since all of these elements will be in the same container, you will be able to show or hide them altogether, not one by one. A small tip worth mentioning is that if you have started with a tiled dashboard, automatically, all parameters and legends will be added to a Vertical container. But don’t worry, you can switch it to Floating by right-clicking on it. 

Once you got your container ready, select it and then select the triangle that is available at the top so you can access the Options menu. Next, you will see a menu like this on your screen:

If you don’t see an identical set of options, you’ll have accidentally chosen one thing within the container instead of the whole container. A great tip that may help you distinguish between those two is the border – selected containers have blue ones, whereas individual elements within them have grey.

Since you have your menu opened, you can click on the “Add Show/Hide Button” option to add one to your visualization. By default, the Show/Hide button appears as a small X. One thing that may confuse you is that if you just click on it, nothing will happen. Don’t worry, that is how the button is designed by Tableau – while you’re working on developing a visualization, the only way to switch the appearance of the button is by alt-clicking. But once your visualization is published, it will work perfectly. 

Oh great, so till now, we have our Show/Hide button placed on our visualization. But we can do way much better than a small X, right? Let’s do some button customization. 

How Can We Do Button Customization?

If you choose the More Options menu, then click Edit Button, you will be presented with a menu like this that provides seven different ways how you can customize the button.

  1. Dashboard Item to Show/Hide – probably a very straightforward one. If the container you made the button with is a vertical one, Vertical will appear here as a default as well. But, you can easily switch it to any other container. 
  2. Button Style – This option right here provides you the opportunity to choose between an Image Button or a Text Button. If you go with the Image button option, it will affect the 4th option below. 
  3. The Button Appearance – This switch between the active settings for either the dashboard item is shown or hidden. Note that all settings below are independent for each of both states.
  4. The Image section – If you have chosen an Image Button here, you upload the desired photo that should represent the button. Otherwise, if the style of the button is Text, this area will be replaced with a text field where you can write what will be on the button and an option to adjust the font. 
  5. The border field. You can choose the style, color, and thickness of the border.
  6. The background field. You can also choose the color and opacity of the button.
  7. The tooltip text. You can also input a text that will appear once you hover over the button.

With these seven options, you can play with your button and customize it to the level to fit the overall tone of the dashboard. For example, if you have any important filters placed in this container, you can use an exclamation mark on a red background for when the container is hidden. That way, you can emphasize the importance of the filters. And once the end-user click on it, it can change to an arrow pointing to where the container is.

Pro Tip: Present the Show/Hide Button As a Big Button Next To a Chart

Let’s imagine a situation. We will use the SampleStore data for the example. We want to develop a dashboard where we will present the total amount of Sales per category with a line graph and text graphs for each category. Something like this:

But due to better user experience, we want our end-users to be able to choose if they want to see the graph or not. And plus, we want to make that look sophisticated. Show/Hide Button is the answer.

  1. First, we need to open an empty dashboard and drag one Horizontal or Vertical Container for our chart. Remember that in order for the Show/Hide button to work, we need a Horizontal or Vertical container.

  1. Add a Show/Hide button for your chart (or whatever your element maybe).

  1. Right-click on the button and start editing it.

  1. Make it a text button instead of an image button.

  1. For Title and Tooltip, add one space as text – set it up like this for both features, Item Shown and Item Hidden.

  1. I would recommend giving it a different color background for when the button is shown and a different color for when it is hidden. I’ve chosen a blue background for when the chart is shown and a gray one for when it is hidden. This will give a nice distinction.

  1. By default, the button will appear as a small floating square at the right top of the element. Unselect the floating option. 

  1. Now, move the button where you think it will fit the best. I chose to place it to the left of the chart.

  1. As an optional adjustment, add a blank object right of the three text boxes in this example and remember to fix the width of the three text tiles container. If you don’t do this; as a result, that container will stretch over the whole visible space.

As a result, we have a very interactive dashboard. 

What Are Some Use-Cases For the Show/Hide Buttons?

The number of ways how we can use the Show/Hide button is limitless, and it is really up to our creativity. But we just highlight some more common ones to get you thinking:

  1. Gather your filters: Probably the most common use of Show/Hide buttons is for containers that gather filters and parameters. A great tip is to divide your filters or parameters based on certain characteristics, such as general ones, more specific ones, and bonus ones. You can choose interesting Image buttons that will show what the containers have inside. By default, these containers should be hidden, which will definitely enhance the UX of the dashboard once the users open it. Since filters and parameters are usually essential for dashboard usage, don’t forget to make them easy for spotting or even guide the user to them by using text. 

  1. All legends in one place: If your visualizations consist of graphs and charts that use colors (for example, a line chart where each line is different color and presents a different measure), a legend is essential to help the user to understand what is going on in the visualization. But, after some time, when the user becomes comfortable with the visualization and familiar with the colors, the legend won’t be that much needed. But still, it will be good to have it for new users of the visualization or just as a friendly reminder. Therefore, a Show/Hide button to such a container is a great choice since it opens more space on your dashboard.

  1. More elements: To develop a well-organized and clean dashboard, you should show only what is necessary and hide what is not. Yes, sounds good in theory, but in practice, each user values the same visualization differently. For example, some people may be more comfortable seeing a bar chart, while others enjoy the raw data presented in a table. With the Show/Hide button, you can give freedom to the end-user to decide how many and what they want to see. This improves the flexibility of the dashboard.

Conclusion

For those analysts out there that want to avoid crowded dashboards and create clean ones, Show/Hide button feature introduced by Tableau is their best friend. Buttons are easy to be created and customized, which explains why so many people have fun with them and often include them on the dashboard. Whether you use buttons for spreading out the data on your visualization or for packing more elements into one dashboard, being able to switch the appearance of the elements is a game-changer. 


Get our Most Popular Downloads

Download the most popular scenario-based Tableau Workbooks in .twbx format. Used by thousands of Tableau developers and job aspirants every day to improve and fine-tune their CV and Tableau Public profile. Join the largest Tableau Experts Social Group.

Banking & Financial Dataset Analysis

Financial Domain Tableau Dataset and Analysis. The most important domain in today’s industry. Analyze Key Performance Indicators. Discover Risky and Fraudulent Outliers. Download the Tableau Packaged (.twbx) Workbook. Includes a complete Financial dataset analysis. Enhance your Data Analytics experience with our skilled analysis.

Healthcare & Hospital Dataset Analysis

Hospital and Healthcare Domain Tableau Dataset and Analysis. A key field of study with millions of lives at stake. The most sensitive industry today. Download the Tableau Packaged (.twbx) Workbook. Understand how healthcare datasets work. Includes a complete Healthcare dataset with analytical charts. Explore Tableau interactive features with this download.

Insurance Dataset Analysis

Insurance Domain Tableau Dataset and Analysis. Important domain specific metrics and data. Learn how to visualize important metrics. Show outliers and insightful data points. Download the Tableau Packaged (.twbx) Workbook. Includes comprehensive analysis of Insurance data of a large sample population. Uses industry standard analytical practices.

Tableau Practice Test

The best Tableau practice exams built. Period. Explore definitive practical problems created by brilliant Tableau experts.

Get in Touch

Contact Us