Bringing Tables Together: Working Across Independent Data Sources in Tableau
Welcome to the fourth part of our series on bringing tables together! This article covers working with multiple data sources without using Joins, Relationships, or Blends. These techniques will help synchronize your charts when you’re working with two data sources that don’t share linking fields. However, the techniques can also be applied to related models!
Other posts in this series:
Part 1 – Joins and the Physical Layer
Part 2 – Relationships and the Logical Layer
Part 3 – Blending Data Sources
Part 5 – Multi-fact Relationships
Remember – Just because you can use a Join, Relationship, or Blend to bring two tables together, doesn’t mean you should! Sometimes the easiest way to work with multiple data sets is to leave them unrelated. For example, our Problem with Plastic workbook includes 13 independent data sources, including plastic decomposition rates, plastic waste emission numbers, and plastic consumption statistics. Instead of weaving them into a complex data model, our team used parameters and filtering to align the relevant data. Then we placed the charts built with different data sources together in a layout to tell the story.
Using calculations and parameters to work across data sources in Tableau
For this tutorial, I’ll be using both of the default Tableau Desktop datasets, Superstore and World Indicators. I’ve modified the Order Date field to begin in 2008 instead of the current year to make the time periods comparable. Without combining data sets, I can plot Superstore sales next to the national GDP to show the impact of the 2008 recession on the business.
Create a free account, or login.
Unlock this tutorial and hundreds of other free visual analytics resources from our expert team.
Already have an account? Sign In
Calculation synchronization
When working with independent data sets, it’s important to make sure key calculations are consistent across them. Make sure that any shared fields and calculations follow the same format and logic to avoid confusion.
In order to keep both data sources aligned, this is especially important with date filters. Simply using the same logic for concepts like Current Year, YTD, or Today in both datasets can make a huge impact.
If one data source updates in real time, while the other lags a few days, you can synchronize them by filtering both to exclude days after the last complete week, or to exclude any records within X days of the current date.
How to Compare the Last Two Partial Date Parts in Tableau
In our example workbook, I can apply the same date filter to both datasets to make sure we’re seeing the same years in both worksheets.
Parameters
All data sources in Tableau have access to parameter values, which make them an ideal tool for passing values between independent data sources. Parameter controls can allow users to interact with both data sources simultaneously. When data is stored slightly differently between the datasets, we can customize the calculations that reference the parameter values to translate the parameter values into the correct format for the data source.
How to Dynamically Switch Data Sources Using Tableau Parameters
Let’s say we have two data sources that reference people, and one uses First Last notation while the second uses Last, First. We can use string functions like SPLIT() to manipulate the name formats so that both data sources are compatible with the parameter.
An Introduction to String Calculations in Tableau
To demonstrate, I’ve created a Year parameter. The datasets have different calculations referencing the Parameter, customized for their chart types.
Now the user can control the highlight for both charts by updating the parameter value.
Actions and multi-select parameters
Parameter Actions are a great way to supercharge this approach! With a parameter action for each dataset, I can enable click to highlight interactivity for both charts. This can also be used to drive filtering, changes in granularity, or anything else a parameter can control!
The one limitation of parameters is that they only store one value at a time. If you need a multi-select control to affect two independent data sources in Tableau, these tutorials on multi-select parameters will be useful.
How to Completely Customize Multi-Select Filters in Tableau
How to Create Multiselect Parameters in Tableau
Thanks for reading,
Felicia
Related Content
How to Remove Duplicates in Tableau Prep
One of the most common data cleaning issues after joining or unioning data is duplicate rows. Without deduplicating rows, you…
Ryan Sleeper
Automatically Update Parameter Values and Set Workbooks to Latest Date Learn how to change fixed parameter values to dynamic so…
How to Use Secondary Data Sources for Tableau Parameter Actions
In this post you will learn how to connect to a secondary data source and use it for easier parameter…