Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
Calculated column
Calculated table
Measure
Visual calculation
Note
This function is discouraged for use in visual calculations as it likely returns meaningless results.
Note
Week functions only work with calendar based time intelligence.
Returns a table for week to date, in the current context. The table contains all primary tagged columns and all time related columns.
Syntax
DATESWTD(<calendar>)
Parameters
| Term | Definition |
|---|---|
calendar |
A calendar reference. |
Return value
A table containing all primary tagged and time-related columns
Remarks
- This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.
Example for calendar based time intelligence
The following sample formula creates a measure that calculates the 'Week To Date Total' for Internet sales uing fiscal calendar.
= CALCULATE (
SUM ( InternetSales_USD[SalesAmount_USD] ),
DATESWTD ( FiscalCalendar )
)
Related content
Time intelligence functions Date and time functions DATESYTD function DATESQTD function DATESMTD function