Dashboard actions, parameters, and filters are some of the best tools you can use in Tableau. They give you a way to transfer the control of the analysis to your end-users, which is critical in data visualization to help allow discovery for your users and also to make it easier to find and retain insights.

First, we’ll go over the basics of Tableau dashboard actions.

Embedding Tableau Into Salesforce using Visualforce | Zuar
Market-leading CRM platform Salesforce.com recently acquired Tableau [https://investor.salesforce.com/press-releases/press-release-details/2019/Salesforce-Signs-Definitive-Agreement-to-Acquire-Tableau/default.aspx] , an innovative data visualization [https://www.zuar.com/blog/data-automation-improve-analysis-productivity/…

Setting Up Tableau Dashboard Actions

Tableau dashboard actions let you add logic to the dashboard components to create actions elsewhere. They are extremely useful, and luckily, dashboard actions are very intuitive to set up. To set up a new dashboard action, you’ll navigate to “Dashboard > Actions” at the top of the Tableau navigation bar from any dashboard view. You’ll be prompted to add the action, and you’ll have three options to choose from:

  1. Filter - for example, you can make it so if you click on “Sheet One,” “Sheet Two” will get filtered to what you clicked on “Sheet One.”
  2. Highlight - for example, when clicking on “Sheet One,” “Sheet Two” will get highlighted by what you clicked on “Sheet One.”
  3. URL - for example, when you click on “Sheet One,” the action will open a URL either in a browser or as a dashboard component.

After choosing the action type, you’ll see a new screen where you can add the logic to your dashboard action.

Towards the bottom, you’ll see “Source Sheets,” which shows each sheet that the new dashboard action will get added to - you can select any sheets you want for the action you’re creating.

You’ll also see “Target Sheets,” which shows each sheet where the action will take place. Remember the examples above? “Source Sheets” and “Target Sheets” are “Sheet One” and “Sheet Two,” respectively.

In the top right corner, you’ll see options for “Run action on” - here’s what each option means:

  1. Hover - for example, when you hover over the source sheet, that action will take place on its target sheet.
  2. Select - for example, clicking on the source sheet causes the action to take place on its target sheet.
  3. Menu - for example, hovering over the source sheet causes a menu of dashboard actions to appear, and clicking on one of them will execute the action on its target sheet.

Under those options, you’ll see “Clearing the section will:,” which lets you choose what happens when the dashboard action gets cleared (which you can do by clicking on escape). These options are:

  1. Leave the filter - this option leaves the last action that occurred in place. If you filtered “Sheet Two” by a click on “Sheet One,” the filter on the second sheet will stay in place.
  2. Show all values - this will revert back to the dashboard’s original view as if the action had never happened.
  3. Exclude all values - this clears the entire target sheet, meaning that it won’t pop up unless you execute another dashboard action.

Action Filters: A More In-Depth Look

Tableau Dashboard action filters are a relatively easy way to send information from one worksheet to another or one dashboard to another dashboard. In general, an action filter sends information from a selected mark to another sheet with related information, hence source sheets and target sheets.

Overall, action filters are a solid way of creating advanced interactive dashboard features and improve user experience. For additional information on how to build an action filter from scratch, view this documentation.

Types of Action Filters

Tableau continues to roll out new ways of leveraging action filters. Here are the variety of action filter types as of 2/2020:

image of tableau dashboard action menu
  • Filter actions: leverage worksheet marks to pass data from one worksheet to another. This method is similar to a quick-filter but can be more targeted and enabled through users interacting with a worksheet.
  • Highlight actions: leverage one data point on one sheet to highlight other data points on different sheets. Learn how to build advanced highlighting actions.
  • Go to URL actions: leverage a data point on a sheet to open a web page or URL with the ability to customize the URL with marks, values, parameters, or data points. Learn how to build Go to URL actions from scratch.
  • Go to Sheet actions: navigate from one dashboard to another by selecting a mark on a sheet (See example below). Get started with a Go to Sheet action.
  • Change Parameter actions: Change the value of a parameter by selecting a target field on a sheet. Instead of changing a parameter with a filter style UI, users can simply select target fields to pass to the parameter. Parameter actions can be used with reference lines, calculations, filters, and SQL queries, and to customize how you display data in your visualizations. Create a Change Parameter action from scratch.
  • Change Set Value actions: Dynamically add or remove members from a set by selecting marks on a sheet. Create a Change Set Value action from scratch.

Creative Uses for Dashboard Actions

Let’s look at three ways that you can leverage dashboard actions to help improve your user experience:

Use Case #1: Using Every Sheet as a Filter

Adding the ability to use every sheet as a filter is an easy way to add functionality to your dashboard and give your users more flexibility in choosing how they view the data. Here’s how to set it up: On each sheet that you want to use, hover over them, click on the down arrow in the upper right corner, and select “Use as Filter.”

Now, when you click on any of those sheets, the other ones will get filtered to whatever you clicked on originally.

Use Case #2: Embedding YouTube Videos in a Dashboard

Having the ability to embed a YouTube video in your dashboard brings a lot of enhanced experiences for your users, but it can be a little tricky to implement right. Here’s how to do it:

To find the right link to use as your data source:

  1. Navigate to the video you want to embed.
  2. Click on the “Share” button below the video.
  3. Click on the “Embed” tab.
  4. Copy the URL that shows up between the quotations.

Once you have that link, here’s how to embed it to your dashboard using dashboard actions:

  1. Add a “Web Page” component to your dashboard by dragging and dropping it from the left navigation bar on your dashboard. Note: Tableau will ask for a URL when you add the web page - leave it blank for now.
  2. Add a URL action as described in the previous sections.
  3. You should see an empty “URL” box with an arrow to the right of it. Click on the arrow and add the URL you found earlier.

Use Case #3: Performing a Google Search From a Dashboard

With this action, users get the ability to explore just about anything within the dashboard for thousands of various data points. Here’s how to set up your dashboard for Google (or Google Image) searches:

This example is how Ryan Sleeper created his “We’re Not in Kansas Anymore” interactive dashboard, which allows users to click on any location on the map to open a Google Image search of that location.

  1. On Google Images, search for any of the locations you want to add.
  2. Copy the URL from the browser. For example, searching for Kansas City gets you this URL: “https://www.google.com/search?q=kansas+city&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiH6eqWhoDKAhVWz2MKHctYBJsQ_AUICSgD&biw=1366&bih=643”
  3. You can use the entire URL, but any info after the “=isch” (bolded above) is not needed.
  4. Add a URL dashboard option like described in the above sections. In this example, Ryan uses  the “Select” option when prompted to choose the “Run action on.”
  5. Finally, paste your Google search URL into the empty URL box, and replace the query section (bolded above) with whichever field you want to use from your data.

Tableau Dashboard Action Problems

Note: These issues have been resolved in Tableau. However, we will leave our solutions posted in case some users are still having problems with these dashboard actions.

Example 1: Navigational Filter Actions

As Tableau evolves, we have more and more flexibility. And we want to use that to offer a better user experience.

The dashboard buttons and go-to-sheet actions (available since version 2018.3) take care of a lot of our navigational needs.

But sometimes we need more than that. We want to click on a button and move to a dashboard that gets filtered by our selection.

And if we end up using more than one filter action on the same dashboard this is what could happen on the server:

Tableau use gif

Yes, it opens up the new dashboard in a new browser tab/window event though it’s in the same workbook.

Bummer!

Imagine if this dashboard was embedded: it would have taken our users right out of their portal.

Note that this occurred for me when more than one filter action was present at the same time.

Example 2: Drill-down to an independent view

Tableau Desktop gif

The filter actions are working correctly on Desktop, but on the server, they don’t show up at all.  This happened to me when the worksheet I was clicking on was hidden.

Yet another 'pleasant' surprise!

Drop us a comment if you find more bugs like these! It would be interesting to see what other problems you are running into.

Now let’s see how we can deal with some of these issues!

Visualize financial data with Google Finance API, Google Sheets, and Tableau 2020.2 | ZUAR
Tableau 2020.2 [https://www.tableau.com/products/new-features] was a substantial release with new features like Relationships [https://help.tableau.com/v2020.2/pro/desktop/en-us/datasource_datamodel_whatschanged.htm] , Metrics [https://www.tableau.com/metrics…

There’s a simple trick that fixes all problems in most cases. And that is to "Show sheets as tabs" when publishing.

Publish workbook to Tableau Onlne gif

But you might not always want to do that!

Possible reasons could include:

  • sometimes you don’t want the user to have access to all the tabs
  • if you are using dashboards with different dimensions, they get moved around
  • you want to set up your navigation path for the user
  • you simply don’t like the look and feel of it

Have a look at this screenshot to see how it might look on the server with the tabs activated:

sales & profit dashboard

For those of you in this position, I have a workaround which I hope you’ll enjoy.

If you are sharing content through Tableau Server or Online, you’re somewhat stuck with the default navigation. But if you are embedding the content within a portal or a web application, there’s a simple trick to hide it.

Adding a Filter to Tableau Dashboard the Elegant Way: Embedded Analytics

Portals: more than Tableau

Before we dig into the actual problem, let’s take a second and talk about web portals.

Portals are a method of sharing content that is growing in popularity within the Tableau ecosystem.

Here’s a glance at a demo Zuar rapid portal:

Why is this so important for some people? There are so many reasons:

  • you get your look and feel, not Tableau’s (you can even hide the fact that you’re using Tableau from your users)
  • we can extend Tableau’s capabilities, using the Javascript API
  • placing the dashboards within the bigger picture and adding more content around the visuals (as much as I love data visualization, there is always value in having additional context)
  • security: the portal acts as a web application firewall (WAF) in front of your Tableau Server
  • single sign-on (SSO): your users don’t have to log in to Tableau Server/Online once they are securely authenticated in your portal

To see how easy it can be, here’s a blog post from Justin showing not one, not two, but three quick ways to embed a Tableau dashboard into a webpage.

Not let’s get back to our headache!

Add a Filter to Tableau Dashboard: The easy fix

We still need to upload the workbook with the "Show sheets as tabs" option checked. We just need to set a parameter that hides the tabs, and the world order will be restored.

The parameter is called tabs, and we have to set it to no.

Let’s have a look at how we can do this for each of the three embedding methods!

1. Embed code

If you are using the embed code add the following tag inside the embedded object’s code <param name='tabs' value='no' />

Here’s how it should look:

Tableau embed code

2. Link in iframe

If iframe is your cup of tea, add &:tabs=no at the end of the URL like in the screenshot below:

&tabs=no code

3. Javascript API

For those who need the full power of the JS API, you can set hideTabs as "true" within the options object.

Here’s a screenshot of how that should be set up:

Tableau JS API

And that's all there is to it.

The wrong way to go about adding a filter to a dashboard

You might be tempted to try and set a parameter like linktarget=_self to force Tableau to open everything in the same window.

This is a mistake!

You will most likely run into an error like Refused to display 'URL' in a frame because it set 'X-Frame-Options' to 'sameorigin' as you can see below:

Tableau Error

So try to avoid that!

Remember that you still need to publish the workbook with the option "Show sheets as tabs" checked.

The users won’t see any difference on the front end of the web application. They will only get a splendid experience!

Conclusion

Hopefully, you now have a better understanding of what Tableau Dashboard actions are and what they’re capable of, how to use filters in the dashboard, and how to solve some common problems (which have now been resolved in Tableau).

If you have any questions, feel free to reach out to us at info@zuar.com!

Worried that a portal is too challenging or time-consuming to set up? Zuar can spin one up for you within a day, on a free trial basis!

Looking for help with your next Tableau project? We have the expertise to implement whatever you need, no matter how complex. Learn more.

Install PostgreSQL drivers for Tableau Server Linux (Ubuntu) | Zuar
Tableau Error: Unable to connect to the data source After a fresh Tableau Server install, if you haven’t installed PostgreSQL database drivers, you will run into this error when trying to view a Tableau Dashboard that has a live connection to PostgreSQL. Download the PostgreSQL database drivers fro…