Filling in dates
Sometimes a report gives only a start date and an end date, or a start date and a number of days, but the analysis needs a row for every date in between.
Each scenario on this page solves this the same way. A custom column builds a list of dates for each row with List.Dates, and expanding that list then gives one row per date.
Scenario 1: every day between two dates
Section titled “Scenario 1: every day between two dates”Here, each person has a start date, an end date and a number of hours per day:

To fill in the dates between each person’s start and end date:
- Load the table into Power Query.
- On the Add Column tab, click Custom Column, name the column Dates, and enter the formula below.

The formula counts the days from start to end, adding 1 so that the end date is included, and asks for that many dates at one-day steps from the start date. Each row of the new column holds a list:

Next, click the expand button in the Dates column’s header and choose Expand to New Rows:

Each person now has one row for each date from their start date to their end date:

Scenario 2: a number of days from a start date
Section titled “Scenario 2: a number of days from a start date”In this table, each person has a membership start date and the number of days the membership lasts:

To expand each membership into its dates:
- Load the table into Power Query.
- Add a custom column called Dates with the formula below.

Here the number of days is already in the table, so the formula passes it straight to List.Dates. Each row again holds a list:

After the Dates column is expanded to new rows, each membership has one row per day:

Scenario 3: dates at a fixed interval
Section titled “Scenario 3: dates at a fixed interval”This table holds a first appointment for each patient, the number of follow-up appointments needed and the number of days between them. The task is to work out when the follow-ups fall.

To work out the follow-up dates:
- Load the table into Power Query.
- Add a custom column called Follow Up Dates with the formula below.

The list starts one interval after the first appointment, holds as many dates as there are follow-ups, and steps by the interval, which Duration.From turns from a number of days into a duration. Each row holds a list:

After the Follow Up Dates column is expanded to new rows, each follow-up appointment has a row of its own with its date:
