There are use cases where using buttons can aid Tableau dashboard navigation. However a challenge with this approach is the unwanted double click Tableau navigation.
For example in your Tableau report you may have a summary dashboard and a detailed drill down. Perhaps you want the user to drill down from the Summary to the Detail dashboard on a click.
Tableau Actions make this drill down very simple. It’s the drilling back up that is more complicated.
Use Tableau Actions to drill down and drill back up
In this example I have created two worksheets using Tableau’s sample superstore file:
- a very simple bar chart of sales by Country
- a table containing sales by State and Year
In this example we drill down from the bar chart  to the table  and back up again.
To keep things simple each worksheet has its own dashboard. The Summary dashboard contains only the bar chart worksheet, the Detail dashboard is only the table.
Build a Tableau action to drill down
Drilling down from the Summary dashboard is simple using Actions.
Click Dashboard – Actions; set a new filter action using Summary as the Source Sheet, run action on Select and the Target Sheet is the Detail. Target Filters are All Fields.
This sets up the drill down. Click a Country name and it’ll take you to the Detail dashboard, filtered for that Country.
Returning to the Summary from the Detail dashboard is the challenge.
Build a Tableau action to drill up
To return we can create a Back button.
This is actually just another worksheet styled to appear like a button.
Create a new calculated field with the formula ‘Back’.
Then drag that field to the Text shelf of a new worksheet and set it to be a chart type of Shape. Select an appropriate shape, such as a filled back arrow and size to fit the worksheet.
Put this ‘button’ on to the Detail dashboard.
On the Detail dashboard click Dashboard – Actions and set up a new Filter action.
This time the Source Sheet is Detail and only select the Back worksheet. The Target is the Summary dashboard, All Fields as the Target Filters. Make sure it’s set to run on Select.
The user will now be able to drill from the Summary to Detail and return to the Summary.
The downside is with the Back button. Once selected – i.e. the first time clicked – to drill down again it needs to be deselected.
Effectively this means the user needs to double click to go back, one click to reset then click again to go back.
Clearly this double click isn’t a good user experience. However the good news is there is a way to make it single click.
How to set up the actions and navigate without the double click
Create two calculated fields, the first called ‘one’ with the value 1, the second called ‘two’ with the value 2.
Set both fields as dimensions (drag them up to Dimensions from Measures).
Put ‘one’ to the Detail shelf of the Back worksheet.
On the Detail dashboard create a new action; Dashboard – Actions.
To reset the Back button use a new Filter action; the Source Sheet is the Back worksheet on the Detail dashboard.
The Target Sheet is also the Back worksheet – it is self-referencing.
The Target filters are Selected Fields, and the Source Field is ‘one’ with ‘two’ the Target Field.
‘One’ has to be on the Detail shelf of the Back worksheet otherwise it causes an error.
The order of the 2 actions on the Detail dashboard is very important
If you get the order of the Actions wrong, clicking Back won’t take you back to the Summary, it only resets the button.
The name of the action drives the order of the Actions.
Firstly the Back button reset has to happen followed by returning to the Summary sheet.
Therefore prefix the name of the action to rest then back button with ‘a’ and the action back to summary with a ‘b’.
The appropriate naming of the actions means the drilling down and back up again should work seamlessly.
When publishing to a Tableau server there are a couple of other points (frustrations) to keep in mind:
- ‘Show sheets as tabs’ when publishing – if not the Detail opens in a new browser tab
- The browser tabs can be hidden by URL once published, as I have done above. Add a URL parameter to the report URL, &:tabs=no.
The URL published above, using the above technique to publish with sheet tabs then subsequently hiding the tabs, is https://public.tableau.com/views/DashboardNavigation/Summary?:tabs=no