Web Page Objects on Tableau Dashboards

Spice up your Tableau dashboard with a web page object showing additional web-based or other external information at your user’s fingertips

A window too high / Photographer: ephotography (flickr.com)

Tableau dashboards and all their built–in interactive features are a piece of art on their own.

However, in certain circumstances (i.e. if your data and visualization is suitable), you can even top this by embedding a web page object into your dashboard and a URL action to hyperlink to additional web–based information outside of your data source, depending on your data and on the user’s selection.

Google Map views of your geographical data, additional product information from the Internet, websites of other companies, content from your company’s Intranet or even folders and files stored on a file server.

Today’s post is a step-by-step tutorial how to embed web pages into your Tableau dashboard and update the views depending on user inputs. Furthermore the article includes a couple of real life examples and a discussion of the pros and cons of using this technique.

The Idea

Your dashboard hopefully visualizes all relevant information in your database or Data Warehouse you need for successful decisions. However, sometimes the data in your Data Warehouse just ain’t enough. In some cases you need additional, up-to-date information from other sources like the Internet or your company’s Intranet. Detailed data on the products of your competitors, companies’ stock prices, exchange rates, links to external documents and so forth.

The Basics: Web Page Objects and URL Actions in Tableau

What is a Web Page Object?

First and foremost, a Tableau Dashboard combines different views including the legends, the filter controls, the parameters, etc. to one interactive visual display. The views you created on your worksheets are in the focus, but you can enhance the dashboard using other objects, like a title, text boxes, images or a web object.

A web object is a fully functional Web Browser (using Microsoft Internet Explorer) which allows you to add additional information from the web, your company’s intranet or a file server.

Web Page Object - click to enlargeLet’s start with the most basic example: embed a web page into your dashboard statically linking to the Tableau Software website. Go to your dashboard, double click on Web Page in the objects area at the bottom range of the dashboard window (see screenshot left) and enter the link in the subsequent dialogue box.

 

 

 

 

 

 

That’s it. Three mouse clicks and you are good to go:

Web Page Object Tableau - click to enlarge

Please notice that the web object is a fully functional browser, i.e. all links are working, you can enlarge images, watch videos, etc. You can navigate within the web page object using the right click menu or Internet Explorer keyboard shortcuts like the backspace key.

What is a URL Action?

A web browser on your dashboard with a static link is a nifty little feature. However, it is only the first step. Web page objects take their full effect only in combination with a URL action.

What are actions in Tableau?

In a nutshell, actions send information across different worksheets and views. If the user of your Tableau workbook clicks on a data point on any given worksheet or dashboard view, actions give you full control over what should happen on all other worksheets and views.

If you are new to actions in Tableau, you may be interested in this article: The Power of Tableau Actions.

Tableau provides actions to filter, to highlight and so called URL actions. The latter are the ones we will have a closer look on.

A URL action is a hyperlink pointing to web-based resources outside of your data source. Unlike the static link you enter when adding a web object to your dashboard (see section above), a URL action allows you to make the link variable, i.e. depending on the user input. In other words, the user will e.g. click on one product in a data table or a line representing the sales of this product over time and the web page will show additional web-based information for exactly this selected product.

All we need is a dimension containing the correct URL (uniform or universal resource locator, i.e. a link) to navigate the web browser to a specific external resource. This could be a dimension in the original data source, a dimension in a second data set brought in via data blending or a calculated field.

Defining a URL action in Tableau is a piece of cake. The next section provides a detailed step-by-step tutorial.

The step-by-step how-to

In the Visual Gallery of its website, Tableau provides a beautiful interactive visualization of real estate price development in the Seattle area: the Around the Sound Dashboard:

Real Estate Dashboard - click to enlarge

Geographical data in general and real estate visualizations in particular are a primer example to demonstrate how to enhance a dashboard with a web page object.

The basic idea is obvious: After clicking on a bubble on the map or on a line in one of the line charts, a Google Map view of the selected county shall be displayed in a browser object embedded in the dashboard.

The following steps will guide you through the process.

Step 1: Find out how to create the URL

First and foremost, you have to know how to create a URL from the latitude and longitude which navigates a web browser to display this location on a Google Map view. The documentation of the Google Static Maps API will provide you with all information you need.

There are dozens of optional parameters in a Google Map link, but for our purposes we only need to know that ‘ll=’ specifies the latitude and longitude and ‘spn=’ the span of the viewport.

The URL looks like this:

http://maps.google.com/maps?ll=[Latitude],[Longitude]&spn=.1,.1&t=k&hl=en&output=embed

[Latitude] and [Longitude] are the geographical measures in our data source and we set the span (the zoom factor) hardcoded to 0.1. There are some other parameters in the link, but explaining all of them would go beyond the scope of this post. Have a look at the Google Map documentations if you need something else.

Step 2: Bring the URLs to your workbook

You have three main options to bring the URLs to your Tableau workbook:

  1. If you have full control over your data source (e.g. a Microsoft Excel workbook), you can simply add a column and use Excel’s CONCATENATE function or ampersands to create the URL based on the values in columns [Latitude] and [Longitude]
  2. Another option would be Data Blending: create a new Excel workbook including the county names, the latitudes, the longitudes and the URL string (using an Excel function as described above). In Tableau add a data connection to this new Excel file and use Data Blending to link the two data connections.
  3. Create a Calculated Field in Tableau and use the plus-sign and the STR function to create the URL string

Whichever option you prefer, let’s assume we have a new dimension called [Google_Map_URL].

Step 3: Make the URL available for the action

Add the dimension [Google_Map_URL] to the Level of Detail Shelf on all worksheets used on the dashboard.

Step 4: Add a web page object

Double click on Web Page in the dashboard window. In the subsequent Edit URL dialogue you can simply leave the URL empty and click on Ok.

Step 5: Create a URL Action

Go to Dashboard|Actions, click on Add Action and on URL. In the subsequent dialogue select all sheets in the Source Sheets area, activate Select in the Run on Action area and select the field [Google_Map_URL] after clicking on the arrow right to the URL input line:

URL Action - click to enlarge

That’s it.

5 simple steps and you are good to go:

Real Estate Dashboard Enhanced - click to enlarge

Where is the beef? Seven real-live examples

Ok, this sounds like a nifty little feature of Tableau, but where is the beef?

I guess I don’t have a snowball’s hope in hell to cover every possible use case for this feature in a blog post. However, this section provides a couple of more examples on how to use web page objects and URL actions to enhance your Tableau dashboards which hopefully will get you started and provide some ideas.

Example 1: Google Map Views

Especially if you are analyzing geographical data, Google Map views and the option to let the user interact with the Google Map (like zooming in and out, etc.) is always worth consideration. The step by step section above already demonstrated this technique in detail. Anyway, here is another example dashboard I published in an article quite some time ago called The Power of Tableau Actions. The dashboard shows the 50 most prominent summits of the world on a map, a bar chart and the Google Map view of the selected mountain:

50 Most Prominent Summits -click to open the Tableau Public Visualization

The technique for creating the URLs is exactly the same as described in the step by step section. However, this time the links include optimized zoom factors, specified by the parameter ‘spn’ in the URL, e.g.:

http://maps.google.com/maps?ll=27.99,86.92&spn=.429,.596&t=k&hl=en&output=embed

http://maps.google.com/maps?ll=45.83,6.87&spn=.169,.298&t=k&hl=en&output=embed

etc.

Example 2: Links to the Top Selling Books on Amazon

Of course, web page objects are not only eligible for adding Google Maps. If you are analyzing marketing or sales data or if you have to create a competitive analysis, additional web based information on your own and / or your competitors’ products can be very helpful.

The following dashboard shows a table of the bestselling 100 books between 1998 and 2010 in a table on the left side. Clicking into one row of the table displays the Amazon page of this book on the right side of the dashboard:

Amazon Link ISBN - click to enlarge

The data source includes the ISBN of each book ([ISBN]) and the URL action is triggered by this calculated field:

"http://www.amazon.com/gp/product/" + [ISBN]

If you don’t have the ISBNs of the books available, you could also pass through the title and the author of the book to Amazon’s search engine. The calculated field would be this:

"http://www.amazon.com/gp/search?index=books&linkCode=qs&keywords=

"+[Title]+" , "+[Author]

The according dashboard shows the Amazon search results in the web page object:

Amazon Link Search - click to enlarge

Example 3: Major League Baseball Players Profiles

Are you interested in Baseball? Baseball is a primer for visualizing sports data. However, there is so much data available that you probably will barely have all information in your database. Again, the web page object can help. Let’s say you are comparing players by performance and salaries. A link to e.g. www.baseball–reference.com can provide you with any other detail on the selected player you may be interested in:

MLB Dashboard - click to enlarge

All you need to have in your data is the player ID used in the database of baseball–reference.com, like rodrial01 for Álex Rodríguez. The URL looks like this:

"http://www.baseball-reference.com/players/r/rodrial01.shtml"

Example 4: Stock Exchange Charts and Reports

Let’s say you have several listed companies in your database and you want to display the current stock market prices, the stock charts and maybe even some documents and public statements on your dashboard. Another great use case for the web page object.

But here is even one step up: a Tableau parameter in combination with a calculated field enables you to let your user decide, which type of webpage he wants to navigate to.

Let’s take the list of the Standard & Poors 500 companies. We could either look at the actual charts (from www.StockCharts.com):

S&P Dashboard Charts - click to enlarge

Or we navigate to the webpage with all filings of this company (from the U.S. Securities and Exchange Commission www.sec.gov):

S&P Dashboard Reports - click to enlarge

The technique to implement this is pretty much the same as described above. However, we need a parameter and a calculated field based on this parameter.

Here is a screenshot of the parameter dialogue:

S&P Parameter - click to enlarge

And here is the calculated field:

S&P Calculated Field - click to enlarge

That’s it. One parameter and one calculated field and the user can select from two or more web resources at his fingertips.

Please be aware of the fact that changing the parameter does not trigger the URL action. You have to click on a company in the table on the left again to update the web object (see also Pros and Cons below).

Example 5: Currency Exchange Rates

Along the same lines: maybe you have a list of order amounts in different currencies. A web page object can show the latest exchange currency to any given base currency, like USD in this case:

Currency Exchange Rates - click to enlarge

In this example, you have an order amount of 388 Brazilian Real. After clicking into this row of the table, exchange-rates.org shows you the amount in USD and the current exchange rate.

Here is the used calculated field:

"http://www.exchange-rates.org/converter/" +

[Currency Symbol]+ "/" + [Base Currency] + "/" +STR([Value])

[Currency Symbol] is the data dimension containing the symbols (e.g. USD or EUR), [Base Currency] is a defined Tableau parameter to select the base currency and [Value] is the measure in the data source (e.g. 388 BRL).

Example 6: Wikipedia Articles

Care for more generic additional information on your dashboard? How about linking to Wikipedia? The following visualization shows a list of the United States in a table and on a map and the URL action displays the Wikipedia site for the selected state in the web object:

Wikipedia United States - click to enlarge

Here is the calculated field:

"http://en.wikipedia.org/wiki/"+REPLACE([State], " ", "_")

Please note that the REPLACE function is only available, if you are using a Tableau Data Extract.

Example 7: Folders and Documents on a File Server

Last, but not least: you are not limited to websites on the Internet. You can also link to your company’s Intranet or a SharePoint or even simply to a folder or files on a file server or your local harddisk.

This dashboard shows the folders on my local drive with all articles I published on my blog in 2011:

Folders on a Hard Drive - click to enlarge

You see the folders on the left (one folder per blog post) and the files in the selected folder on the right. The web object can be used like a file explorer, i.e. you can directly open files by double clicking.

The URL is a simple path to a folder on my local drive in this case.

C:\Users\Robert Mundigl\Documents\Projekte blogs\01 – Clearly and Simply\B Posts published\[2011]\072 – 2011-07-18 Premier League Historical Statistics

If you are having documents related to your data which can be displayed in a web browser (like pdf), you can directly link to the files from your tables or visualizations. The following dashboard shows the Tableau Quick Start Guide documents (pdfs) stored in several folders on my harddisk:

Files on a Hard Drive - click to enlarge

A click into the table on the left directly shows the Quick Start Guide pdf in the web page.

The calculated field uses the prefix "file://" followed by the path and name of the files:

"file://"+[Path]+[Filename]

Something Else?

Yes, much more. The possibilities are inexhaustible. Everything that can be displayed in a Web Browser can become part of your dashboard.

In my humble opinion, one of the best Tableau blogs out there is Andy Kriebel’s VizWiz. In case you haven’t seen it yet, earlier this year Andy published an excellent post on how to use a web page object to embed a PowerPoint presentation into your Tableau dashboard using a web page object:

Tableau Tip: Embedding a Presentation in a Dashboard

Great job, Andy.

The Pros and Cons

The advantages of the described technique are obvious: it is easy and fast to implement, easy to understand, easy to use and opens a window to all kind of information outside of your data source.

However, web page objects on dashboards also come with some limitations and pitfalls:

  • Web page objects require a considerable amount of real estate and real estate is definitely the most limited resource on a dashboard.
  • You have to do some research on how to create the URL links, like reading the Google Map documentation or how to pass a book title to Amazon’s search engine via a hyperlink.
  • URL actions work only for the first web page object on your dashboard. You can have more than one web object on a dashboard, but the URL action will always trigger only the first one.
  • URL actions are limited to links that can directly be passed to the web object. You can’t use APIs or HTML code.
  • Only the URL action is triggering the update of the web page. In other words, the web page will only be updated after the user clicks on one of the views defined as the source of the URL action. Changing a parameter, for instance, will not update the web page.
  • Last, but not least, please forgive me stating the obvious: you need an Internet connection. If you are working offline, the web page on your dashboard will stay empty.

Download

The layout of my blog is not suitable for providing wide Tableau Public dashboards. That’s why I did not publish my example workbooks on Tableau Public and used screenshots instead. If you have Tableau Desktop available or the free Tableau Reader installed and you want to play around with the examples, here is a link to a zipped folder containing all Tableau workbooks mentioned above (except for the ones linking to folders and documents on my hard drive, since those wouldn't work for you):

Download Tableau Web Page Objects Examples (zipped folder with 8 Tableau Packaged Workbooks, 1,355K)

Summary

Web page objects in combination with URL actions are a great way of enhancing your visualizations. They are easy to implement, easy to understand, easy to use and offer the opportunity of bringing up–to–date additional information from the Internet or an Intranet to your dashboard.

However, you should always think twice before using them. Don’t use a web page on your dashboard just for the sake having one. Only use them, when information from outside of your data source will considerably increase the content and the usability of your visualization. Dashboards are made to answer questions. If additional information from the Web really contributes to the process of analyzing and understanding your data, a web page object is the way to go.

Stay tuned.

Comments

39 responses to “Web Page Objects on Tableau Dashboards”

  1. Kelly Martin Avatar
    Kelly Martin

    Robert, thank you for these great examples and step-by-step instructions. I am inspired! Much appreciated.

  2. Rohan Avatar
    Rohan

    Can a URL action on one dashboard update a web page object on another dashboard? Or does the web page object have to be on the same dashboard that contains the sheet with the URL action?

  3. Robert Avatar

    Rohan,
    thanks for your comment and sorry for the late reply.
    As far as I know there is no way of updating a web page object on another dashboard. URL actions always update the web page object of the currently active dashboard.

  4. gwen Avatar

    thanks for this

  5. Shams Avatar

    thorough step to step

  6. aalok jain Avatar
    aalok jain

    I have been trying to publish a dashboard with an embeded pdf from a network path.
    Post publishing, i am able to view the pdf on the preview screen however when we view the dashboard on a browser, it is completely blank.
    Unsure what is going wrong here.

  7. Robert Avatar

    aalok,
    I can reproduce this. I double checked and the two workbooks I described at the end of the post (displaying files in a folder and displaying PDF documents) do not work anymore. Not at all, I mean not even in Tableau Desktop, let alone on the server. The workbooks linking to a webpage are still working like a charm.
    I have no clue why. I assume Tableau changed something in the recent versions which affected this functionality of the webpage object.
    I can’t tell you what happened. I am sorry. Maybe you want to search on the Tableau Forums or contact Tableau’s support team to get an answer.

  8. Adams Mikki Avatar

    Perfect description, perfect and accurate way of describing it step by step. This article really inspired me a lot… Fabulous Job!

  9. Saket Bhardawaj Avatar

    Hi Robert,
    First of all thanks a lot for your help.
    Robert,somehow the maps are not loading for me I am getting this error
    : The Google Maps Embed API must be used in an iframe.
    Can you help me to solve this problem

  10. Robert Avatar

    Saket,
    I published this article back in 2012 and in the meantime, Google requires to wrap up the URL in an iframe and to pass a mandatory API-key.
    Have a look at the Google API documentation here:
    Google Maps Embed API

  11. Omer Avatar
    Omer

    Does anyone know if it is possible to have a web page object with a picture and to download it to a PDF format? when I convert to PDF the web page objects just appear blank.
    Thanks

  12. Robert Avatar

    Omer,
    this is an article published in 2012 using Tableau 7.
    Since version 8, displaying a PDF in a webbrowser on a dashboard doesn’t work anymore. The URL action opens your default browser showing the PDF instead. Displaying folders (see example #7 in the article) doesn’t work anymore either.
    Please see also my reply to aalok’s comment above.

  13. VizKid Avatar
    VizKid

    Hey Robert,
    thanks a ton!! your instructions and examples are so crisp and detailed, i greatly appreciate your helping hand, looking forward for many such articles.

  14. elliot Avatar
    elliot

    curious if when displaying XLS file the user can then download directly from tableau to their desktop. Is opening XLS file in local Excel on machine possible

  15. Robert Avatar

    Elliot,
    I am sorry, but I am not sure which example you are referring to.
    If you are talking about example #7: since version 8 of Tableau, use case #7 does not work anymore. You can’t display the files inside of a folder in a Tableau Web Object. Please see also my answer to aalok above.
    If you are referring to download links provided on a website displayed in the Tableau web object: the Tableau web object is just an embedded webbrowser, so I assume it depends on the settings of your webbrowser.

  16. J Avatar
    J

    nice job.
    Is it possible that an button click event on the web page object triggers dashboard to refresh.
    thanks,
    J

  17. Robert Avatar

    J,
    no, this is not possible. The web page object is simply an embedded browser showing the website of the link specified in the URL action.

  18. j Avatar
    j

    thanks.

  19. Vineeth v Avatar

    Hi Robert
    I am facing an issue, where i have embedded url link in the web component to play a youtube video.
    Problem is when i try to play the video in the from desktop version, video doesn’t play, it gets stuck with loading symbol.
    But if i publish the same dashboard to tableau public, i am able to play.
    Not able to find out whats the reason for the strange behavior.
    Can you help me out
    Regards
    Vineeth

  20. Robert Avatar

    Vineeth,
    I just tried and it works fine for me. It sounds strange that it isn’t possible in Desktop but works on Public. Maybe a security setting or firewall rule on your computer?

  21. Javed Avatar

    Can a web page object take the data from tableau data source?

  22. Robert Avatar

    Javed,
    URL actions in Tableau are just passing links (URLs) to the Web Object (i.e. embedded browser) on the dashboard. You can use dimensions or measures from your data and / or parameter values to create a dynamic URL in a Calculated Field and pass this field to the Web Object in the URL action, like I did in the examples 2, 4, 5 and 6 above.

  23. Robbaltrusch Avatar

    when you copy embed code from youtube, they drop the URL scheme (that is, http / https). The reason why they do this is so that the video will work behind either scheme (instead of having to give you two options to choose from as most users won’t know). Just add a scheme to the front of the URL for it to work from your desktop as well. The reason why it doesn’t work from your desktop is because the scheme you are using is file://, however Tableau Public is using http. Hope that helps.

  24. Rich Avatar
    Rich

    What version was this originally published in?

  25. Bastin Avatar
    Bastin

    Hi,
    Using action URL i need to pass the selected value to text file or csv file..
    Means i need to print the selected info in the txt file or csv file and save it..
    Is that possible???

  26. Robert Avatar

    Bastin,
    I am not sure I understand your question correctly: do you want to save what the user clicked on in the webbrowser (e.g. in an online form)? If so, I do not think this is possible. As I wrote in my reply to Javed’s question above, the URL action is simply passing a URL to an embedded webbrowser. I do not see how you could get back into Tableau what the user clicked on in the browser, let alone write this to a csv file.

  27. Bastin Avatar
    Bastin

    Hi Robert,
    Thanks for your reply..
    May be i will try to re frame my question here…
    In action URL normally we can pass value to web pages like you shown in your examples..
    Like that in URL instead of Http i am passing a local drive path
    \\workstation1\d$\myfile.txt
    if i run the action its opening my txt file .. So in any way instead of just opening the file could i able to pass an value here like how we passing to the http to filter the data Or can we write those information in that txt file…
    ———————————————————————————————————
    The aim for achieving such thing is… We have some dashboards which we will published to VP and Directors level.. when they are seeing any red mark kind of data normally they will put mail to particular person to work on the issue it will be difficult for them to track the status.. So we designed tracker using web methods where if we drop the file in the location it will create the ticket automatically based on the information available in the txt file, now i am trying to interact the both tableau and this web methods so when i saw this URL action for opening the text file i thought if i find a way to push the information[selected data in tableau] to txt file. It will be very helpful.
    If there is any other way to achieve such thing kindly guide me on that pls.
    I hope i explained it properly.. Sorry for my bad communication.

  28. Robert Avatar

    Bastin,
    I do not know of a way to write something to a text file using a standard URL action in Tableau.
    You may want to have a look at Michael Martins guest posts here

    Writing and Reading Tableau Views to and from Databases and Text Files – Part 1

    and

    Writing and Reading Tableau Views to and from Databases and Text Files – Part 2

    about writing from Tableau to a database or a text file, but this approach requires an R installation. Not sure, if this is applicable in your situation.

  29. bastin Avatar
    bastin

    Thank you Robert, I already checked it but i cant use R… Any way thanks for your support..

  30. Aman Avatar
    Aman

    Hi Robert,
    I want to call VBA Macros in tableau. Is there a way we can do that? I know how to trigger VBA Macro using R but I am unable to apply the same in tableau. Any advice would be really helpful
    Thanks,
    Aman

  31. Robert Avatar

    Aman,
    I do not think this is possible in Tableau. Calling a VBA macro would mean you open an application like Excel from Tableau (e.g. with an action) and the code would be executed. I do not see how this would be possible in Tableau. Doesn’t mean it is impossible, though. It is just above my head. Maybe you want to post your question on the Tableau Forum?

  32. Miguel A Chavez Avatar
    Miguel A Chavez

    Thank you .

  33. Hrushikesh Avatar
    Hrushikesh

    Hi Robert,
    Can we show authenticated web app inside web page control by mapping the tableau user with webpage control?
    Thank you
    Hrushikesh

  34. Robert Avatar

    Hrushikesh,
    Tableau’s URL action simply allows to pass a URL to the web page object on the dashboard. You can create a specified URL based on data from your data source in a Calculated Field just like I have shown in most of the examples in the article.
    If you want to open a web page which requires user credentials, you would need the name of the user (the function USERNAME() returns the name of the current user) and the password. Even if you would have the password(s) in the data source or hard-code it in the Calculated Field, I doubt there will be a web application allowing to pass the username and the password in a URL. And for very good reason, because this would be a serious security issue.

  35. Leo Avatar
    Leo

    Hi! thanks a lot for this information.
    Is it possible to clear the web page element when is not being clicked/hovered?
    In my dashboard, the user can hover a table and the image from each row will appear, but I need that if the user is not hovering the table the web page shows a blank. Right now it keeps the last image that has been hovered.
    I don’t see a “Leave the selection/exclude values” in the URL action…
    Hope I’ve been clear

  36. Robert Avatar

    Leo,
    no worries, you have been as clear as possible.
    I do not know of a built-in Tableau feature which would accomplish what you are trying to do. Doesn’t mean there is no such feature, I just do not know it.
    All I can think of is the following work-around:
    Define a URL action for all other views of your dashboard (except the one that should show the image in the Web Page object), select “Run action on Hover” and about:blank as the URL. This way, the Web Page object on your dashboard will at least be cleared, if the user hovers over a data point of one of the other views on your dashboard. This will not be the case, if she/he hovers over a filter, a legend, an image, the title, etc., but at least if the mouse is moved to another view.
    Agreed, not really elegant, but it does the job.
    I hope this helps.

  37. Leo Avatar
    Leo

    Thanks a lot Robert! I will try this and see if works well with the user
    You are aweseome!

Leave a Reply

Your email address will not be published. Required fields are marked *