Filter a Tableau Dashboard using Salesforce 

In my previous post I walked through how to embed a Tableau dashboard in Salesforce. In this post we’ll explore the options to filter the embedded dashboard using the Salesforce interface, for example, by selecting a different Account to view.

If you don’t already have a Tableau dashboard embedded in your Salesforce page, follow this blog post and get to the Edit Page section. Below the URL for the Tableau view field are the filter options that we explore below.

Filter on Record Id

This is the simplest filtering option and is enabled by simply checking a box:


The only requirement is that the corresponding Record Id (for example Account Id or Opportunity Id) for the object you are selecting in Salesforce is present in the data source used for your dashboard.

Below is the Edit Page view before the Filter on Record Id option is checked. Note that the visualisation contains a separate row for each Salesforce Account, i.e. no filtering is in place.


Below is the view with the Filter on Record Id option checked. Now, only the Account that has been selected in Salesforce is showing in the Tableau view:


After saving and activating the page you will be able to search for and select different Salesforce Accounts using the Salesforce interface and the Tableau view will update to match your selection. Scroll through the below images as an example.

Tableau Advanced Filter

The second option allows us to specify a field or parameter from the data source that is used in the Tableau view and then select a field from the Salesforce data that the Tableau field should match.

First, as a simple example, I’ll create a tableau parameter from the Account Name field and call this Account_Parameter:


Then I’ll create a calculation that will return True or False and add this to the view, filtered to True only. This filter will ensure only the selected Account shows in the view.


With the parameter added to the view, I’ll publish the updated view and uncheck the Filter on Record Id option. The selected Account in the Tableau view now doesn’t match the selected Account in Salesforce because the parameter is set to Edge Communications and United Oil & Gad Corp. is selected in Salesforce:


To resolve this we update the Advanced Filter options as follows:

  • Add the parameter name (Account_Parameter) into the Tableau Advanced Filter text box
  • Select the Account Name field from the Salesforce Advanced Filter drop down (all available Salesforce fields will be shown, as below)


Now, when a different Account is selected in the Salesforce interface, that value is passed to the Account_Parameter in Tableau and the view filters to match the same Account:


The below recording shows the parameter, and Tableau view that is filtered by it, updating based on an Account selection in Salesforce:

Summary

These filtering options make it quick and easy to embed your Tableau views into Salesforce and ensure they sync with the Salesforce user interface, removing the need to filter twice. In the simple example above there were only a few Accounts to choose from but with an org containing many thousands of Accounts, being able to use the Salesforce interface to search is a major advantage and a much better user experience.

Be notified of new content…

If you find these Tableau tips and tutorials useful, you can follow me on LinkedIn for all the latest content.

Thanks,
Marc

The recent release of Tableau 2024.1 includes an update to spatial buffers and you can now create these buffers around line string objects.

Click here to learn more…

Comments are closed.

Create a website or blog at WordPress.com

Up ↑