Not your personal relationships! Although I do hope those are going well for you. I’m talking about Tableau Desktop’s new feature in 2020.2. This is an important one. For both experienced data analysts/scientists and new beginners. The implications of this new feature will impact the fate of the world (ok maybe not that extreme). But it will absolutely impact beginner’s needs to learn overall data concepts and also the explicit control that expert users are used to holding.
If you’re on version 2020.2 or above (for my future readers), you’ll notice the data pane has changed slightly. This is actually to accommodate the new relationships feature. If you’re not using the relationships feature, this will be an annoying change. But if you are using relationships, joins, or custom SQL, it’s the most sensible way Tableau could’ve organized the data pane now that there are multiple tables in a data source.
What Are Relationships?
According to the Tableau website:
Relationships are an easy, flexible way to combine data from multiple tables for analysis.https://www.tableau.com/about/blog/2020/5/relationships-part-1-meet-new-tableau-data-model
Let’s unpack this a bit. Tableau says flexible, and it absolutely, positively means flexible. You can add multiple fields to a relationship, multiple relationships between tables, select cardinality and referential integrity of each table, and more. This is all to give the developer an easy path towards correct levels of details in your dashboards and easily designed data models.
P.s. I’ll need to make multiple posts about this topic as Relationships turn out to be a pretty deep feature in terms of configuration and the downstream impacts.
The Big Benefits
- Tableau now can handle multiple levels of detail in one data source.
- No accidental data loss (although you could have accidental data hiding).
- Relations between multiple fact tables is now possible.
- Contextual and dynamic (!!!!) joins.
- Aggregations are correctly generated by Tableau based on the relationship.
- Better performance since queries will only get data that is relevant to the current view.
The Big Drawbacks
- No circular relationships in your data model.
- No inequality relationships.
- Calculated fields can’t be used for relationships.
- Published data sources are (still) not able to be used for any data modeling.
- Data types are taken from the underlying database, and relationships won’t work with mismatched types. Changing the data type in Tableau has no impact on whether a relationship can be made.
- There are 8 rules or semantics that developers need to know about now when developing.
Things to Watch Out For
In my opinion, some concerning problems with data sources surface with this new feature. Things that would normally be discovered without the relationships feature are pushed further under the rug. Here are some of them.
- Bad data models (or no data models at all) with dirty data can make relationships not perform as expected.
- Data source filters negatively impact performance in some cases. This is due to how Tableau removes unnecessary joins usually in queries.
- Poor choices for relationship fields won’t return quality data. If the fields chosen don’t have a lot of matching values, your dashboard probably won’t be too useful.
- The additional semantics involved with relationships are something that need to be internalized by developers. Otherwise inaccurate visualizations might be presented.
Wrapping It Up
Tableau has knocked it out of the park with this one. But with great power comes great responsibility. The relationships feature vastly expands the possibilities and ease of analyses that use multiple tables. Relationships take care of some common areas in which beginner developers tend to make mistakes. Which can be a good thing and a bad thing.
If you understand relationships, they can be a great tool. If you think you understand relationships (but really don’t) or you just use them without researching their behavior, you might be in for a world of hurt. I’d say, improve your relationship with relationships and your Tableau life will blossom.
- Quick Tip: How to develop more efficiently with big data sets Tableau Desktop
- Quick Tip: The MAKEDATE Function in Tableau Desktop
- Quick Tip: Hide the Null indicator in Tableau Desktop when you don’t want to filter the data
- The hardest part about making dashboards for Tableau Public
- Fails to Deliver and GameStop – A Look Inside