Easily Create Collapsible Menus, Sheet Selectors, and Much More Using Navigation Buttons




Easily Create Collapsible Menus, Sheet Selectors, and Much More Using Navigation Buttons


Since the release of Tableau Desktop 2018.3, Set Actions have been at the forefront.  Set actions simply opens up so many possibilities in regards to how we analyze and interact with data.  Dashboard Navigation Buttons, however, are nice, but certainly don't come with the bells and whistles and don't provide the capabilities that set actions do.  Or do they?  I personally believe that they may be just as powerful as set actions, just in a completely different way.

To dig into this further, let's go back a couple of weeks when I was visiting my brother Ken in Pennsylvania during the Thanksgiving holiday.  Twas the night be for Thanksgiving, while at my brother’s home in PA.  We decided to party it up by answering forum questions, oh yay!  (Okay, that's the last of the rhyming).  Ken is an old pro at answering forum questions, but that was my first time and I quite enjoyed it.  In one of the posts, a user asked how he might go about creating a dashboard where filters are hidden when first viewing the dashboard, but could be shown by simply clicking a “show filters” button.  Ken mentioned the ingenious work of Robert Rouse who talks about how to actually build a collapsing menu container in Tableau.  I had not read this blog post previously, but I went ahead and read it.  I agree, it’s genius.  However, when I read the original question on the forum, I had an entirely different idea as a solution.  You guessed it, dashboard navigation buttons.

The introduction of dashboard navigation buttons helps make so many things simpler.  All we need to do is create a duplicate dashboard, make our changes on that duplicate dashboard, then use a button to navigate back and forth.  To be clear, this technique may not be the most optimal for your situation, but it only takes a couple minutes to build and it has so many applications.  (Note that I will be focusing on how to implement this technique in version 2018.3, but there are ways to build it in older versions which I will also discuss).  

To start explaining how this really works, lets first focus on the collapsible menu that was asked about in that forum question.  (Yes, I do know that this is a feature that Tableau intends to implement in a future release, but the application of this technique is what we are really interested in...and you can do it todayAnd  as another side note, we will focus on collapsible menus, but the intention of this blog post is to open up this technique to the dozens of things that can be accomplished with it...not just collapsible menus).  First, what are we talking about when we say “collapsible menu”?    Well, they are everywhere.  They are in Word and Excel where you can collapse the menus at the top of the screen:



These collapsible menus are also very common on websites that have been optimized for smartphones due to limited real estate.  If you go to Tableau’s website on your phone, you will see one of these collapsible menus (this one is often referred to as a hamburger menu).  When you click it, it opens up a new set of options and when you click the X, it collapses.  


In the first part of this blog post, we will be quickly and easily recreating this hamburger menu.  I will be using one of Tableau’s Superstore sample workbooks which looks like the following.  (Click here to see the final version and download the entire workbook from Tableau Public).

As you can see, there are a lot of filters on the left hand side of the dashboard.  We want the user to first see the dashboard without all of these filters then only show the filters when the user clicks on the hamburger menu. 

First, I created an image for the hamburger menu.  I just created it in PowerPoint using three lines.  I also created an X image.  They look like the following and can be downloaded using the following links: Hamburger ButtonX Button




Next, let’s go into Tableau (feel free to download the workbookand follow along). 

·        First, we need to duplicate the dashboard so we have two identical dashboards. 

·        In the first dashboard, remove all the filters and Filter title.  It should look like the following:



·        In this dashboard, float a button (new in 2018.3) onto the upper left corner of the view.

·        Select the carrot on the button and choose Edit Button.

·        The first option is to choose where to Navigate to.  Choose the second dashboard.

·        Now choose the hamburger menu image. 

·        You can also add a tooltip for when you hover over this hamburger menu.  I added “Show Filters”. 

·        Click OK and size the button appropriately. 

·        Your first dashboard should now look similar to the following:



·        Now select the second dashboard.

·        The second dashboard should remain unchanged with all filters intact. 

·        Like you did with the first dashboard, float a button to the top left corner of the dashboard.

·        Set it to navigate to the first dashboard, use the X image, and use a tooltip that says “Hide Filters”. 

·        Size the button appropriately. 

·        The second dashboard should now look like the following:


Okay, that’s it!  That’s all we need to do.  So let’s see how it works.  While on the first dashboard, go to Window and choose Presentation Mode (this is in Desktop, but if you are using Tableau Public only, just publish it up to Tableau Public).  Click on your hamburger menu and it will show the filters.  Click on the X and it will hide the filters.  The truth is, it is actually navigating to a duplicate dashboard with some slight changes, but the user experience is exactly the same.  That’s it!!!!!  (Download the full workbook here).  


This technique is made very easy with the addition of dashboard navigation buttons in version 2018.3.  However, you can still do it in older versions.  All steps remain the same with the exception of how the buttons (hamburger menu and X) are created.  In older versions, you will need to create a chart using a custom shape that would just be plotted as a single point on a scatter plot.  You then apply dashboard filter actions to move to the next dashboard.  The key is that when you publish it, you "Show Tabs".  The blog post from Nicco Cirone on The Data School website discusses how to do this in depth: Creating Dashboard Navigator Buttons.  I heavily relied on this technique in my IronViz feeder entry, Candy Land, and discussed this entire process in my associated blog post as well.  (As a side note, with Dashboard Navigation Buttons in 2018.3, there is no need to show tabs when publishing the workbook.  It will work seamlessly without showing tabs).  

The one drawback with this method (whether in 2018.3 or older versions) is that it does require duplicating your dashboard and therefore causing you to have to manage an additional dashboard.  

So what else can we do with this technique?  To be honest, there are so many options.  Recently I was speaking with my colleague, Ethan Hahn (who is a SQL and Tableau wiz).  He mentioned how he had built a viz using a sheet selector, (basically giving the user the option to look at one chart versus another) using the Sheet Selector blog post on Tableau's website.  Matt Chambers also took this technique and improved upon it by utilizing dashboard actions (note that Matt recently wrote another fantastic blog about this using set actions as well).  Ethan utilized this technique for a professional dashboard, but also used it in his Vietnam Draft Lotteries viz.  You can see how he allows the user to switch between a scatter plot and a box and whisker plot.


The above-described technique could be used for a sheet selector as well.  Like before, simply duplicate the dashboard, bring in a different chart from a different sheet, then use a navigation button to switch between the two.  In my sample workbook, I've done this using the same data but switching from a line chart to a bar chart.

I used this exact technique in my Oh Night Divine viz.  In that viz I overlaid a radial bar chart (built to look like the North Star) with a scatter plot (built to look like stars).  The charts both had transparent backgrounds, but were stacked on top of each other and therefore you could only interact with one of them at a time.  In one dashboard, I changed the float order of the radial bar chart to be on top and on the second dashboard, I changed the float order so that the scatter plot was on top.  I added a button to switch between each view.  You could then interact with one chart then click the button which allowed you to interact with the other chart.  It basically toggled between the two.

Ken Flerlage recently wrote a color themes blog that discussed how to give users the ability tchange from a light background to a dark background (especially for those users with light sensitivity).  It's a fantastic read.  When he and I discussed his technique for doing this, I suggested using the technique I described above.  He ultimately included this as an alternative option in his post.

Earlier this year, Ken Flerlage wrote about Image Swapping.  The duplicate dashboard technique would easily allow for that.  You could also allow your users to select their preferred language.  As an example, did you know that nearly 37% of the people in Los Angeles speak Spanish?  If creating a dashboard for Los Angeles residents, you might want to create a duplicate dashboard, translate the text, and allow the users to select their preferred language.  

truly believe that the possibilities are endless and I’m excited to see what this awesome community comes up with.  I hope you like this simple, little trick - let me know if you use it.  And as always, if you have any questions whatsoever, feel free to contact me at any time. 

Edit 07/13/20:  In March of 2019, I presented on the Power of Dashboard Navigation Buttons.  You can watch that video here:



Kevin Flerlage | December 10,2018 | Twitter | LinkedIn | Tableau Public
















4 comments:

  1. Thank you Kevin for this great post!

    ReplyDelete
  2. Never before have I wished to be Vulcan as I do now. My brain has become an insatiable sponge. Awesome post, and I will definitely use this.

    ReplyDelete
  3. This is great if there are only couple combinations. Are there any performance issues if we want the collapsible menu + change charts + swap out views? In that case, there will be more combinations of dashboards to switch between so it might get slow - but I have not tried it.

    ReplyDelete
    Replies
    1. The truth is, there are a lot of options here. You could do a sheet swap, you could duplicate a dashboard and use a dashboard button (as I have noted), and now, with 2019.2, you can use floating collabsible containers. There are so many options.

      Please note that I don't recommend duplicating sheets, just dashboards, so I don't expect that it would cause too many performance issues.

      Give them a try. I'd be excited to hear what options you like the most.

      Delete

Powered by Blogger.