#2 Creating Dynamic User Experiences Using URL Filter Actions in Tableau Server
Have you ever had a case where a client was asking you to make navigation between dashboards as convenient and easy as possible? You might have heard phrases like “We have to make it as intuitive as possible for our users to navigate from A to B so they don’t abandon our BI solution!”. If you find yourself in similar situations sometimes, then this brief blog post might be an interesting one for you.
A pretty decent option to let users navigate between dashboards and make the data presentation “responsive” are Dashboard Action Filters. They allow you to filter data in a dashboard based on a selection on another dashboard. These action filters are quite powerful because they allow you to create really nice “deep dive” or “drill down” type of user experiences.
However, one negative aspect about dashboard action filters is that you will have to have the dashboards inside the same published workbook to use conventional dashboard action filters. This can be a bit of a pain because sometimes you want to let users go from one dashboard to another which is not part of the same workbook. And what if in addition to that you want users to be able to navigate to different dashboards based on a particular dimension of the selected data point. In other words making the action dynamic. Let’s look at a particular example.
Imagine you have three different dashboards published to Tableau Server - An “Overview” about sales and profit by state including a map view, a “Sales” dashboard which compares actual sales vs quotas and a “Profit” dashboard which gives deeper insight into product profitability. Besides that, imagine that our goal is to navigate to the Sales dashboard when we click on a profitable state in the overview so that we can check whether we actually achieved our sales quota in that state. And if the state is not profitable we want to be able to navigate to the product profitability dashboard to get a better understanding for why the state wasn’t profitable. These types of user experiences can be implemented in Tableau using URL actions, which are another type of dashboard actions. Here is how you do it using the example described above.
1. The initial steps are quite the same compared with conventional dashboard action filters. Only now, we will work with URL addresses. First, a few basics on URL addresses in Tableau Server or Tableau Online as this knowledge will become important to create dynamic actions. Take a look at the URL template underneath. A URL address consists of the server name, site name, workbook name and dashboard or sheet name concatenated as depicted in the template. Lastly but not mandatory, we can add field names to the URL so that Tableau knows which field to filter the data on that we’ll get to see in the targeted dashboard. Given we have the URL addresses of our “Sales” and “Profitability” dashboards, which we already published to the server, the next step is to open the “Overview” dashboard in Tableau Desktop where we want to implement the action.
2. If the dashboard is open in Tableau Desktop, we first want to create two calculated fields which we will use to make the action dynamic. The first field gets the name “URL - Action Name” and looks like in the screenshot underneath. We will use this field later to give our action a dynamic name so that users know where they are going when they click on a state in the sales map.
3. The second field we need gets the name “URL - Dashboard Name” and will later be used to construct the dynamic URLs. The formula is in the screenshot underneath. The names between the apostrophes are derived from the URLs of the other two published dashboards. To get these names, we simply open those dashboards inside Tableau Server or Tableau Online, copy the URL from the browser’s URL bar and remove everything but the parts, which were named “<workbook-name>/<dashboard-or-sheet-name>” in the URL template under point 1).
4. Before we can use our calculated fields in any action, we’ll need to add them to the view that we want to execute the action from. In our example, we go to the sales map sheet and pull the two fields onto detail in the marks card.
5. Now that we have all calculated fields we need in the view, we go to the overview dashboard, click on “Dashboard” in the menu bar at the top and then “Actions…”. In the new window we click on “Add Action >” and then “Go to URL…”. The new window will first look something like this.
6. Here we first set the action name to be something like “Go to <AGG(URL - Action Name)>”. Hint: To insert the calculated field we created in step 3), you can click on the grey arrow on the right of the text bar and select the field from the list.
7. Next step is to select the view from which we want to be able to execute the action. We will select “Sale Map” only and keep all other views unselected. Also we set this action to be a "menu" action. You will find this option together with "Hover" and "Select" on the right side. Hint: If you want users to be aware of a menu action in a view, I recommend you add something like "click for more options..." to the bottom or top of the view's tooltip.
8. Now we construct the URL. In order to do that we copy the URL from one of the published dashboards and keep only the part until “.../views/”. After having done that, we insert the calculated field <AGG(URL - Dashboard Name)> using the grey arrow on the right again and we’ll add /State=<State> to the end of the URL. If I lost you on the way, take a look at the following screenshot. This is how it should look like altogether.
9. The last step is to actually go ahead and publish this dashboard to the server to test the URL action in an online environment. I’ll leave it with you as I know you all can do that by yourself.
In order to wrap up this post, I hope you got inspired to think about the many options you now have creating dynamic user flows across dashboards from different workbooks. In the end, our goal as consultants should always be to make our clients’ experience with Tableau as a product as smooth as possible and I think there is nothing better than making dashboards visits feel like browsing through the internet, because this is what almost everyone is used to do nowadays.