How to Repeat Rows in Tableau

Cody Schneider••8 min read

Ever tried to visualize a running count of active projects or subscriptions, only to find that your Tableau line chart has gaps on days where nothing new happened? To solve this, you need a way to repeat, or duplicate, your rows for every relevant time period. This process, often called data densification, is crucial for accurate time-series analysis.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

This tutorial will walk you through the most reliable method for repeating rows in Tableau using a technique called "data scaffolding." We'll cover why it's necessary and provide a clear, step-by-step guide to get it done.

Why Would You Need to Repeat Rows in Tableau?

At first, repeating data might sound counterintuitive. Why would you want more rows? The simple answer is to fill in the blanks. Your original dataset usually only records events when they happen: a new subscription starts, a project kicks off, a sale is made. It doesn't record the quiet days in between.

Without a row for every single day, month, or week, Tableau has no mark to plot, leading to broken lines or incorrect counts. Repeating rows lets you create a complete timeline for analysis.

Here are a few common scenarios where this is essential:

  • Tracking Active Projects: You have a list of projects with a start date and an end date. You want to see a chart showing how many projects were active on any given day. To do this, you need a row for each project for every single day it was active.
  • SaaS Subscription Reporting: You want a running total of active subscriptions. A new customer signs up on January 5th and another on January 10th. A proper running total needs to show the same count for January 6th, 7th, 8th, and 9th, which requires duplicating the first subscriber's row for those days.
  • Inventory Management: You need to visualize inventory levels over time. You log when new stock arrives and when items are sold, but you need to see a continuous line representing the stock level on days with no activity.
  • Event Scheduling or Resource Allocation: You want to see how many rooms in a hotel are booked each day over a month. A booking from the 5th to the 10th needs to be counted on all six of those days, not just the start and end dates.

In all these cases, the goal is the same: transform a dataset of start and end points into a continuous dataset that has an entry for every relevant time increment.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

The Main Approach: Data Scaffolding with a Date Join

While there are a few ways to approach this, the most robust and understandable method is data scaffolding. A "scaffold" is just a separate, simple data source you create that contains a complete list of all the points you want on your timeline (e.g., every single date for the past five years).

You then join your primary data to this scaffold file. This forces your original rows, like a single project record, to be duplicated for every date between its start and end date that exists in your scaffold.

Let's build this step-by-step using a project management example.

Step 1: Get Your Primary Data Ready

First, let's assume you have a primary dataset that looks something like this. It could be in a spreadsheet or a database. The important thing is that it has a unique identifier for each event and a clear start and end date.

Example Data: "Projects"

If you connect only this data to Tableau and try to visualize active projects over time, you'll see activity on the start and end dates, but not on the days in between.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Step 2: Create Your Date Scaffold

Your scaffold is the key. It’s an incredibly simple file - often just a single column. You can create this in Google Sheets or Excel.

Create a new spreadsheet with one column header, let’s call it "Calendar Date." Underneath it, list every single date you might need for your analysis. For our example, let's list every date from March 1, 2024, to March 20, 2024.

Pro Tip: A quick way to do this in a spreadsheet is to type your start date in the first cell, then drag the fill handle (the small square at the bottom-right of the cell) downwards to automatically populate the consecutive dates.

Your scaffold file should look like this:

Save this spreadsheet as "Date Scaffold" or something similar.

Step 3: Connect to Your Data in Tableau

Open Tableau and connect to your two data sources:

  1. First, connect to your primary data source (the "Projects" file). Once it's loaded, drag the sheet onto the canvas.
  2. Next, click "Add" to connect to a new data source. Select your "Date Scaffold" spreadsheet. Drag the scaffold sheet onto the canvas next to your "Projects" sheet.

Tableau will try an "innocent until proven guilty" join and connect the tables, but it's probably wrong. Now we'll tell it exactly how they should relate.

Step 4: Configure the Join Logic (The Most Important Step!)

This is where the magic happens. We are going to use a non-equi join, which means we're using operators like "greater than" or "less than" instead of a simple "equals" sign.

Click on the join relationship noodle (the intersecting circles) to configure the join clauses. Delete any default relationship Tableau created.

Our goal is to create a row for a project on a specific calendar date if that date falls on or after its start date and on or before its end date.

Set up the following two join conditions:

  1. Start Date (from Projects) <,= Calendar Date (from Date Scaffold)
  2. End Date (from Projects) >,= Calendar Date (from Date Scaffold)

Make sure this is an Inner Join. This ensures you only create rows for the dates that match the criteria. Now check the data preview at the bottom. You should see "Project Alpha" repeated for every date from March 1 to March 10, and so on. You've successfully densified your data!

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Step 5: Build a Visualization with Your Duplicated Rows

Now you can build the report you originally wanted. Go to a new worksheet.

  1. Drag your Calendar Date dimension from the scaffold file to the Columns shelf. Set it to "Exact Date" and ensure it's continuous.
  2. Drag your Project Name dimension from the projects file to the Rows shelf.
  3. Change the aggregation for Project Name to a Count (Distinct), so it tallies the unique number of projects active at any point in time. Your pill on the Rows shelf should now look something like COUNTD([Project Name]).

You’ll now see a perfectly continuous line chart showing the total number of projects in progress each day. No more gaps or misleading drops!

Advanced Tips and Considerations

  • Number of Repetitions Scaffold: What if you don't have start/end dates and simply want to duplicate a row N times? You can use a similar scaffolding technique. Your scaffold file would simply be a list of numbers from 1 to N (or however many duplicates you might need). Then, you would configure a join where N is greater than or equal to a field indicating the desired number of duplicates.
  • Performance: Be conscious of data size. If your primary table has 10,000 rows and your date scaffold has 3,000 dates, you could generate millions of rows. This can slow down Tableau. Where possible, filter your scaffold file or your primary data before the join to keep the dataset manageable.
  • Left or Right Joins? Changing the join type may be useful. If you use a Right Join with the scaffold on the right, you guarantee that every single date from your scaffold appears in the final result, even if no project was active. This is perfect for showing zeros instead of gaps.
  • Leveraging Tableau Prep: For very complex densification or pre-aggregation, consider using Tableau Prep Builder. It offers more powerful visual tools for joining, cleaning, and shaping data before it even hits your main Tableau Desktop workbook, which is often more efficient.

Final Thoughts

Learning how to repeat rows with the scaffolding technique unlocks a whole new level of analysis in Tableau. By creating a complete timeline and joining your transactional data to it with smart <,= and >= logic, you can move beyond simple event-based reporting to analyzing a full, continuous view of operations over time.

Of course, building scaffolds, setting up intricate joins, and preparing the data is often the most time-consuming part of analytics. We've experienced this pain ourselves, which is why we built Graphed. Our platform connects directly to your data sources and automates the entire process. You can simply ask a question like, "Show me a chart of my active Shopify subscriptions per day last quarter," and get an interactive dashboard built instantly, without ever needing to touch a spreadsheet or configure a join.

Related Articles