Our Certified Tableau Trainers are asked a myriad of questions each day. In this series, they share some answers.
Here’s another question I hear from time to time during Tableau training:
“How do I make a URL action open inside of the dashboard rather than in a new window?”
You may know how to make dashboard URL Actions in Tableau that link to various webpages based on selected words or phrases, but did you know that the webpages can be displayed directly within your dashboard?
A Quick Review on URL Actions
Before learning how to embed the webpage actions into a dashboard, let’s review how to generate a URL Action. I started with two different worksheets and placed them on a dashboard. The first worksheet visualizes Sales by Category and Sub-Category while the second displays Profit, Sales and Profit Ratio for the top 5 Manufactures. My goal is to use a URL Action to open a webpage so my report viewers can look up more information about specific Manufacture.
Once my worksheets were in position, I navigated to Dashboard Menu and clicked Actions. In the following menu, I clicked Add Action and choose URL.
In the Add URL Action menu, I changed the name of the action to “Learn more about ” where was inserted via the Insert Arrow (►) to ensure the name would change as different Manufacturers were chosen. I unchecked the box for the worksheet called Sales by Product, because I only wanted Top 5 Products (the text table that shows the top 5 Manufacturers) to generate the action. I verified that the action was being run on Menu so that my report viewers would have the option to navigate to the URL only if they wanted by clicking the name within a tooltip.
The only step remaining was to enter the URL so that the link would work. I used a Google search URL for the example below, replacing the search keyword. Replacing the search keyword with the Manufacturers field the same way I used the Insert Arrow (►) in the name. I also added the word “Manufacturer” to the URL to ensure that the search returned manufacturers only and no other instances of the word.
Once the URL was verified through the Test Link button, I hit Okay to close out of the Add URL Action menu pane and once more to exit the Actions pane. Now, clicking any Manufacturer will trigger the URL Action menu within the tooltip as shown below:
When “Learn more about Canon” is clicked, a user’s native web browser opens and displays the webpage based on URL entered in the URL Action. Since I used a dynamic name to define the URL Action, if we were to click on another Manufacturer, then the name would change as well as the URL:
Directly Embedding Webpages
URL Actions can be a powerful addition to your dashboards, but in order to make it a little more efficient and user friendly, let’s improve functionality by including the webpage directly on the dashboard.
From the Objects pane within the Dashboard pane, drag a Web Page to a blank area on your dashboard. The area where the Web Page object will appear is highlighted gray.
As soon as the Web Page object is dropped, a prompt will appear to edit the URL. Pressing OK without entering a URL will let Tableau to use this Web Page object with any URL Action on the dashboard.
To ensure the Web Page object is working correctly, I clicked on the manufacturer Canon and the hyperlink for the URL Action within the tooltip. Sure enough, the webpage opens within my dashboard: