OpenBI Docs Buy

TOTALWTD

An expression evaluated over the week to date; needs a calendar.

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

Group: Time intelligence. Compatible with DAX.

Syntax

TOTALWTD ( <expression>, <calendar> [, <filter>] )
ParameterTypeDescription
expressionExpressionThe value wanted, usually a measure; it is evaluated with the dates as its filter.
calendarCalendarThe name of a calendar defined in the model that has a week category.
filterFilter
optional
A condition or a table that filters as well, as a filter argument of CALCULATE does.

Returns

Same type as the expression. The expression over the week to date.

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.
  • It is CALCULATE ( expression, DATESWTD ( calendar ) ), with the filter added when one is given: from the start of the week of the last date in the filter context to that date.
  • 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.

Examples

Without a calendar

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

EVALUATE
ROW ( "Week to date", TOTALWTD ( [Volume traded], Prices[Date] ) )

Result: an error.

DATESWTD, TOTALMTD, TOTALYTD, STARTOFWEEK.

Last updated · OpenBI Studio 0.3.74