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

Tim shows how to build a date scaffold in Tableau using nothing but a plain Excel date list and Tableau's relationships, letting you count how many records (e.g. patients) fall on any given day without any data prep tool.

The challenge: a dataset with only an ID, a start date, an end date and a location, and the goal is to show how many records are active on any given day across the full date range. No Alteryx or Tableau Prep allowed, so the only fix is Tableau's own relationship/data model features plus one small Excel file.

The Breakdown
  1. Understand what the scaffold needs to do 1:21

    For each record with a start and end date, you need it represented on every day in between, so a straight connection to the source data won't show a daily count. Recognising this is what tells you a date scaffold is needed.

  2. Build the scaffold in Excel 2:13

    Create a one-column list of consecutive dates in Excel covering the full range you need, starting from an arbitrary date that doesn't exist in your real data to avoid conflicts, and dragging the fill-down to generate one row per day. This is the only step done outside Tableau.

  3. Connect both data sources in Tableau 4:02

    Connect to your original data (patient/ID records) and the new date scaffold file as two separate connections, then check the date ranges in each to confirm what you're working with before modelling anything.

  4. Make the scaffold your primary data set 5:21

    Because you're visualising a value across every day, bring the scaffold in first as the primary table — it doesn't strictly have to go first, but it makes writing the relationship logic much easier.

  5. Define the relationship with two conditions 6:41

    Set the relationship so a scaffold date qualifies when it is greater than or equal to the start date AND less than or equal to the end date. Both conditions are required together — this is what links each scaffold day to every record active on it.

  6. Confirm the relationship works at query time 8:00

    Relationships blend the two tables at query time rather than joining them, so you don't get an exploded row-per-combination data set — you keep two clean tables that resolve correctly when queried.

  7. Test and build the visualisation 8:23

    Drop the scaffold date onto the view first and check counts look sensible (e.g. consistent days per month, correct leap years) to validate the scaffold, then use a distinct count of ID against the date to get a true daily count, adding dimensions like state to break it down further.

Worth Knowing
  • Bringing in a non-distinct count or plain detail of ID won't work correctly once the relationship is active — you need a distinct count to get an accurate per-day figure.
  • The visible date range in your view will shrink to only where both conditions are satisfied, so don't be alarmed if it looks narrower than the raw scaffold range.
  • Choosing a scaffold start year that clashes with real data risks incorrect matches, so deliberately pick one outside your actual data's range.
  • This same approach applies to any scenario with a start/end date pair, such as support desk tickets or occupancy — not just hospital patient data.
Use It When

Reach for this when you need to show a daily (or per-period) count of things that have a start and end date — occupancy, active tickets, patients in system — but you're not allowed to use a data prep tool to explode the rows.

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.