OpenBI Docs Buy

DATESWTD

The dates from the start of the week to the last date in the filter context; needs a calendar.

Part of the calendar-based time intelligence that Power BI added in 2025.

Group: Time intelligence. Compatible with DAX.

Syntax

DATESWTD ( <calendar> )
ParameterTypeDescription
calendarCalendarThe name of a calendar defined in the model that has a week category.

Returns

Table. The calendar's dates from the start of the week to the last date in the filter context.

Remarks

  • It takes a calendar only: a column of dates is an error. A calendar is defined in the model on a date table and tags its columns as year, quarter, month, week, date and the like; the week is whatever the calendar's week column says, ISO weeks from Monday or a retail week.
  • The week is the one of the last date in the filter context. With ISO weeks and Wednesday 13 March 2024 in the filter, it gives Monday 11 to Wednesday 13 March.
  • The calendar must be able to read the filter context: one of weeks and dates without months cannot answer under a filter on a month, and the call is an error.
  • The result holds the calendar's rows with all its tagged columns, so it is meant as a filter: CALCULATE ( MIN ( 'Date'[Date] ), ... ) gives one date from it.

Examples

Without a calendar

The Example Brewery defines no calendar, so a date column is all it can offer, and the call fails.

EVALUATE
CALCULATETABLE ( DATESWTD ( Prices[Date] ), Prices[Date] = DATE ( 2026, 9, 9 ) )

Result: an error.

TOTALWTD, DATESMTD, STARTOFWEEK, PREVIOUSWEEK.

Last updated · OpenBI Studio 0.3.74