List.Dates

List

Generates a list of date values starting from a given date, with a specified count and step duration.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

List.Dates(start as date, count as number, step as duration) as list

Parameters

NameTypeRequiredDescription
startdateYesThe starting date value.
countnumberYesThe number of date values to generate.
stepdurationYesThe duration to add between each successive date. Use #duration(days, hours, minutes, seconds).

Return Value

listA list of date values of length count, beginning at start and incrementing by step.

Remarks

List.Dates is the standard way to generate a continuous or stepped sequence of date values in Power Query M. It is most commonly used to build date dimension tables, fill in missing dates in time-series data, or create calendar scaffolding for reports.

The step parameter is a duration value created with the #duration(days, hours, minutes, seconds) literal. For day-by-day sequences use #duration(1, 0, 0, 0), for weekly use #duration(7, 0, 0, 0). Avoid using List.Dates for monthly sequences — because calendar months have variable lengths, use List.Generate with Date.AddMonths instead to produce accurate monthly increments.

A count of 0 returns an empty list; negative counts cause an error. To generate a full calendar year, calculate the count with Duration.Days(#date(year+1,1,1) - #date(year,1,1)) to handle leap years automatically.

Examples

Example 1: Generate a week of daily dates

List.Dates(#date(2024, 1, 1), 7, #duration(1, 0, 0, 0))
Result
Result
11/1/2024
21/2/2024
31/3/2024
41/4/2024
51/5/2024
61/6/2024
71/7/2024

Example 2: Generate weekly dates for a quarter

List.Dates(#date(2024, 1, 1), 13, #duration(7, 0, 0, 0))
Result
Result
11/1/2024
21/8/2024
31/15/2024
41/22/2024
51/29/2024
62/5/2024
72/12/2024
82/19/2024
92/26/2024
103/4/2024
113/11/2024
123/18/2024
133/25/2024

Example 3: Build a date dimension table

let
    DateList = List.Dates(#date(2024, 1, 1), 366, #duration(1, 0, 0, 0)),
    DateTable = Table.FromList(DateList, Splitter.SplitByNothing(), {"Date"})
in
    DateTable
Applied Steps

The final output — converts the date list into a single-column table with each date in its own row.

Date
11/1/2024
21/2/2024
3...

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks