# Tableau Data Model: Relationship calculations

> This is content from just-tim, the data-and-analytics channel by Tim Ngwena (formerly 'Tableau Tim'). Tim has 12+ years of hands-on BI experience and covers Tableau most of all, plus Power BI, Looker, Hex, SQL and data modelling, the analytics industry, and the craft of doing the job — always tool-agnostic and honest about the trade-offs.

- **Author:** Tim Ngwena (just-tim, https://just-tim.com/about)
- **Published:** 2020-08-12
- **Format:** Video · 4 min watch · transcript available
- **Topics:** Data prep, Data visualisation
- **Tools:** Tableau (calculated fields, data modelling, relationships)
- **Canonical:** https://just-tim.com/posts/tableau-data-model-relationship-calculations-now-in-2020-3
- **Watch:** https://www.youtu.be/7IzYHl_phmY

I walk through the relationship calculations feature added in Tableau 2020.3, building on the relationships introduced in 2020.2. Using the beta Bookshop data source, I show how to create a relationship between authors and books using a calculation that concatenates two string fields into a single Book ID.

## Key takeaways

- Relationships arrived in Tableau 2020.2, but the ability to define them with calculations was only added in 2020.3
- To create a relationship calculation, drag a table to relate it and pick the relationship calculation option at the bottom of the field matching dialog
- You can concatenate two string fields, such as Book ID 1 plus Book ID 2, to form a single matching key for the relationship
- This removes the need for the older workaround of using join calculations inside a relationship to bring fields together
- Once set up, Tableau pulls related fields together dynamically across the data model

Watch the full video, read the transcript and use chapter deep-links on the page: https://just-tim.com/posts/tableau-data-model-relationship-calculations-now-in-2020-3

---
just-tim — Data and analytics, with a point of view. · https://www.youtube.com/channel/UC7HYxRWmaNlJux-X7rNLZyw · https://twitter.com/TableauTim · https://www.linkedin.com/in/timngwena
