Downloads
Power Query MDateBeginner

Date.StartOfWeek

Returns the first day of the week that contains a date, using the day you name as the first day of the week.

Syntax
Date.StartOfWeek(dateTime as any, optional firstDayOfWeek as nullable Day.Type) as date

Returns: The start of the week as a date, or null when the input is null.

What it does

Date.StartOfWeek moves a date back to the first day of its week. The week starts on Sunday by default. Pass Day.Monday when the business counts weeks from Monday. Weekly cash, sales and labor reports group by this date, and it is the most readable week label.

Syntax and arguments

Example

A weekly cash report groups daily bank activity by the Monday that starts each week. The report then shows one row per week.

let
    Cash = #table(type table [CashDate = date, Net = number],
        {{#date(2026, 10, 26), 1000}, {#date(2026, 10, 30), -400}, {#date(2026, 11, 2), 250}}),
    Week = Table.AddColumn(Cash, "WeekStarting", each Date.StartOfWeek([CashDate], Day.Monday), type date),
    Weekly = Table.Group(Week, {"WeekStarting"}, {{"NetCash", each List.Sum([Net]), type number}})
in
    Weekly

October 26 and October 30 fall in the week starting Monday, October 26, so their net is 600. November 2 starts its own week. The weekly net cash figures are 600 and 250.

Example: a second, different use

Find the first day of the week for a delivery date when the supplier's week starts on Sunday, using the default argument.

Things to watch

In business terms

Weekly reporting is common in retail, services and cash management. A week start date on each row is a clear, unambiguous label that the whole team can read, and it matches how the business defines its week.

Related functions

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