Date.StartOfWeek Function in Power Query

The Date.StartOfWeek function returns the start of the week for a given date, based on a specified first day of the week.

Syntax

Date.StartOfWeek(dateTime as any, optional firstDayOfWeek as nullable number) as any

The function has the following parameters:

Day Number Reference

Returns A date value representing the start of the week for the specified dateTime.

Example:

Power Query M

let
    Source = Date.StartOfWeek(#date(2025, 4, 5), 1)
in
    Source         

The output of the above code is 31-03-2025.

Key Benefits