This post explains ways to pass information a web page to a Tableau Workbook on the server. This web page can be anywhere.
- There are visuals in two separate dashboards that users want in one place,
- A web page passes variables to Tableau Server, and
- A visibility control mechanism that allows certain visuals for select people.
Note: This is for Tableau and Tableau Server/Public 10.0 and above.
Embedding a Dashboard Within a Dashboard
Sometimes areas want to reuse visuals from one dashboard on another. Usually this mean making a copy of the visuals and data. The problem with this is that the visuals will slowly diverge as creators apply updates. It may even come to the point where they will give different answers, even if both dashboard use the same data source.
To get around this problem, embed the dashboard. This keeps the source the single version of the truth.
1. In IE 11, Chrome, or Firefox go to the dashboard you wish to embed
2. Click Share > Link
3. Copy the URL link
Note: At this point, web site designers can use this link to embed a visual into a web page if they wish to place the visualization in a Iframe. However, a better idea would be to use the embed code for best presentation and more control. This is useful on Microsoft SharePoint, Yammer, and blogs such as WordPress.
This is what it looks like when a Tableau Public dashboard is embeded into WordPress. Sizing is a bit off with this view. Full version
4. In Tableau Desktop, create a Dashboard page
5. Under Objects, select Web Page
6. Drag it to the canvas
7. In the Edit URL popup, paste the link (CTRL+V)
8. Click OK
Optional – Sizing
If the linked dashboard linked is larger than the source dashboard it might not fit the view. To fix this you need to have Tableau adjust the size of the screen.
Under Size > Fixed Size, choose Automatic (easiest to use but developers should play with the fixed sized settings for best fit.)
Optional 2 – Look an Feel
Developers can also control the look and feel depending on the options sent via the URL.
Each of the colored items are options. You can append as many as you need.
- :embed=y —– Turns off Tableau server header and only shows the dashboard
- :tabs=no —– Turns off tabs and only shows the linked page of the workbook
- :toolbar= —– Turns on and off download and edit toolbar at the bottom of the page
- :tooltip=no —– Turns off tooltips
- :showShareOptions=false —– Stops people from being able to share the view
- :format=png —– Will turn the secondary dashboard to a picture. Useful to prevent people from downloading the data. It also can be copied into presentations.
Note: These options only work with Tableau Server not Tableau Public.
Optional 3 – Filtering
Developers can pass parameters from one dashboard to another through the URL. This allows the main dashboard to filter items on the secondary dashboard.
In this example, the link in the main dashboard contains a parameter that passes along the agency to the secondary dashboard. Since the test dashboard has a field or parameter called ‘Districts’, this filters the embedded dashboard. The URL can contain multiple filter-parameters.
The parameter in the main dashboard does not need to have the same name as the field in the secondary dashboard, but it may help with passing variables
See this in action: Link
Hard Coding Parameters
Developers can also hardcode the filters. This is useful when users need to see only a subset of the data. In this example will display the state of Alaska. Some developers will be able to use dashboard actions to finely control what is sent to the secondary dashboard.
See this in action: Link
Note: This can be used as to filter data based on people’s ID or name. For instance, a page a user ID via the URL to a dashboard embedded on an intranet site. This provides good visibility protection for those non-technical users, but should not be on the public internet.
Developers can also pass more than one filter in the URL.
Here, there are multiple filter values with State using multiple values. This displays only career reps in both Alaska and Tennessee.
See it in Action: Link
- Spaces in filters and valid values need to be changed to %20 (ex: Carol Stream –> Carol%20Stream) for them to work on the web. Other escape characters may also need to be altered to fit in a URL.
- To send filter values correctly, users need to have Interactor Filter access to the secondary dashboard in Tableau Sever/Public.
- Don’t send links to private data via public URLs as the link are visible.
- More information on filtering: http://onlinehelp.tableau.com/current/server/en-us/embed_structure.htm
Update #1: In checking with Tableau, it looks like embedded reports do not print to PDF. This is by design as a security and visibility feature. This also goes for graphics and web pages that are embedded.
- Add a toolbar to embedded dashboard to download it as a separate report. In the URL string use toolbar=top or toolbar=yes.
- Take a screen shot (I use a program called Greenshot for picture perfect capture.)
- Make it an online only report and point people to it. Developers can subscribe users to updates so they always get the latest version of the report when available through a periodic email.