Video | Tableau | Data prep | Data visualisation

Tableau Data Model: Relationship calculations

Relationships landed in 2020.2, but now in 2020.3 you can finally build them with calculations.

Watch on YouTube
  • 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

Tableau 2020.3 lets you define a relationship between two tables using a calculation, rather than only a direct field match, so you can build a matching key on the fly instead of pre-processing your data.

Built on a simple data source with authors and books, where the books table splits its ID across two string fields that need combining before they can match the authors table.

The Breakdown
  1. Recap: basic relationships from 2020.2 0:40

    Tableau can automatically detect and relate tables when a shared field, such as an ID, already matches cleanly between them.

  2. The old workaround: join calcs inside a relationship 1:02

    Before 2020.3, if the fields you needed to match didn't line up directly, you had to open the relationship and use a join calculation to bring the data together — an extra, fiddly step.

  3. Remove the artificial workaround field 1:23

    If you'd built a field purely to force a match under the old method, you can now get rid of it since it's no longer needed.

  4. Drag in the table you want to relate 1:40

    Drop the second table next to the first as normal; Tableau will attempt to auto-match fields, but you don't have to accept its default guess.

  5. Write a calculation to build the matching key 2:02

    In the calculation editor, concatenate the two string fields (for example Book ID 1 plus Book ID 2) to construct a single key that matches the other table, then apply and confirm.

  6. Use the related data as normal 2:20

    Once set up, you can drag fields from either table onto a sheet and Tableau pulls the related information together dynamically, exactly as with a standard relationship.

Worth Knowing
  • Relationships themselves were introduced in 2020.2; the ability to define them via calculation is new in 2020.3, so this only works on that version or later.
  • This removes the need for the older join-calculation workaround inside relationships, which required opening and editing the relationship directly.
Use It When

Reach for this when the fields you need to relate two tables on don't already match directly — for example when an ID is split across multiple columns or needs formatting to line up.

How this Rollup was made provenance & method

A Rollup is drafted by AI from the video's transcript, then reviewed and edited by Tim. Everything used to produce this one is listed below — the model, the exact prompt, and the source video — so the process is transparent and reproducible.

Transcription
On-device — NVIDIA Parakeet v3 for recent videos, OpenAI Whisper large-v3 for earlier ones. The transcript never leaves the machine or gets published.
Drafting
Claude Sonnet 5 in the cloud, from that transcript.
Prompt
The exact Rollup prompt (v2) — the full system prompt, unedited.
Source video
Watch on YouTube
Drafted
5 July 2026 at 09:38
Reviewed & edited
5 July 2026 at 09:41 · by Tim Ngwena

Model + prompt + video is everything you'd need to recreate a Rollup like this yourself. The one thing we don't share is the transcript.

Rights. The video and its transcript are the property of TN Media Ltd. Unauthorised use or download is prohibited. © TN Media Ltd.