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


Returns the last day of the week in the provided date, datetime, or datetimezone dateTime. This function takes an optional Day, firstDayOfWeek, to set the first day of the week for this relative calculation. The default value is Day.Sunday.

Reference Data

Power Query M Functions / Date Functions / Date.EndOfWeek