Video | Tableau | Data visualisation | Data prep | Analytics

How to create a date scaffold in Tableau using Relationships

Here's how to scaffold dates and count patients per day in Tableau, with no data prep beyond one tiny Excel file.

Part ofTableau quick tips
  • You can build a date scaffold without Alteryx or Tableau Prep by creating a single Excel file containing one row per day across the full range you need
  • Choose an arbitrary start year that doesn't exist in your real data to avoid any date conflicts when generating the scaffold
  • Make the date scaffold your primary data set when you want to visualise a value across every day of a range
  • Define the relationship with two conditions so each scaffold date falls between the start and end date (date >= start date and date <= end date)
  • Relationships blend the data at query time rather than via a join, so you avoid an exploded data set, then use a distinct count of ID to count patients per day

Relationships in tableau open up new possibilities with scaffolding. In this video, I show you how to manipulate the way relationships work to build scaffolds in Tableau. In this example I show a typical use case you’ll see on support desk data or patient records in Tableau where you need to be able to display the daily total of open tickets or patients in treatment. This technique doesn’t require any table calcs and is record/row specific because of the way relationships work.

0:00 - Intro 1:34 - Setting up our scaffold 4:07 - Checking our main data set 5:17 - Setting up our data model to scaffold 8:20 - Checking our scaffold has worked