Downloads
Power Query MList: pick and buildBeginner

List.Dates

Builds a list of dates: a start date, a number of dates, and the gap between them.

Syntax
List.Dates(start, count, step)

Returns: A list of date values.

What it does

List.Dates creates a run of dates in one step. You give the first date, how many dates you want, and the step, which is a duration such as one day. It is the usual way to build a calendar for a date table, or a list of days to check against a register of postings.

Syntax and arguments

Example

A close calendar needs every calendar day of January 2026, so that each day can be checked for postings.

let
    Days = List.Dates(#date(2026, 1, 1), 31, #duration(1, 0, 0, 0)),
    AsTable = Table.FromList(Days, Splitter.SplitByNothing(), {"Date"}),
    Typed = Table.TransformColumnTypes(AsTable, {{"Date", type date}})
in
    Typed

Days holds 31 dates, from January 1 to January 31. The table form then has one row per day. The same pattern with a longer count builds a full date table for a year or more.

Example: a second, different use

A list of days from a start date to an end date: count = Duration.Days(EndDate - StartDate) + 1, so both ends are included.

Things to watch

In business terms

Date tables for time intelligence, calendars for close and payment schedules, and daily checks that every day has a posting all start from a list of dates. Build it once and reuse it in every report.

Related functions

All Power Query M functions · View as Markdown · M basics