Filling in dates
Overview
Let’s say you have been given a report with a set of start and end dates, but the report needs to be fully expanded to show all the in-between dates.
This article explains various ways of doing this.
Scenario 1 – Continuous dates between dates
Imagine, for example, you have been given the following table:
![](images/filling-dates-1.png)
To fill in the dates between the two dates given for each person, you need to do the following:
- Load the table into Power Query
- Add a Custom Column with the following formula
![](images/filling-dates-2.png)
The query should look as follows:
![](images/filling-dates-3.png)
Next, expand the List objects in the ‘Dates’ column, like this:
![](images/filling-dates-4.png)
The table should expand as follows, with all the in-between dates filled in:
![](images/filling-dates-5.png)
Scenario 2 – Fill in x amount of days
Sometimes, you might get data in the following format - which holds the membership start date for each person, and their membership duration, in days.
![](images/filling-dates-6.png)
To expand these to the correct dates, you need to do the following:
- Load the table into Power Query
- Add a Custom Column with the following formula
![](images/filling-dates-7.png)
The query should look as follows:
![](images/filling-dates-8.png)
After expanding the ‘Dates’ column, the query should transform as follows:
![](images/filling-dates-9.png)
Scenario 3 – Fill in specific days
Imagine the following scenario, with follow up dates for an appointment. You need to determine when these follow up appointments are.
![](images/filling-dates-10.png)
To determine the correct dates, you need to do the following:
- Load the table into Power Query
- Add a Custom Column with the following formula
![](images/filling-dates-11.png)
The query should look as follows:
![](images/filling-dates-12.png)
After expanding the ‘Follow Up Dates’ column, the query should transform as follows, with the correct Follow Up Dates, populated:
![](images/filling-dates-13.png)
Feedback
Submit and view feedback