DATESMTD
The dates from the start of the month to the last date in the filter context.
Group: Time intelligence. Compatible with DAX.
Syntax
DATESMTD ( <dates> )
| Parameter | Type | Description |
|---|---|---|
dates | Dates | A column of dates of the model, such as Sales[Month], or the name of a calendar defined in the model. |
Returns
Table. The column's dates from the start of the month to the last date in the filter context.
Remarks
- The month is the one of the last date in the filter context.
- Given a column, it reads the dates visible in the current filter context; in a row context, such as
ADDCOLUMNS, the row becomes a filter first, so each row sees its own dates. - On a column with one date a month, such as Sales[Month], it is just that month's date; it is meant for daily dates.
- Only dates the column holds come back: a date the move or the period lands on that the column lacks is left out, and when none is left the table is empty.
- Given a calendar instead of a column, it works on the calendar's own periods (fiscal years, retail months of four or five weeks, ISO weeks). A filter on a category the calendar does not define, such as a month on a calendar of weeks, can make the call an error.
Examples
Business days of the month so far
Tuesday 8 September 2026: six business days.
EVALUATE
CALCULATETABLE (
DATESMTD ( Prices[Date] ),
Prices[Date] = DATE ( 2026, 9, 8 )
)
ORDER BY Prices[Date]
| Prices[Date] |
|---|
| 2026-09-01 |
| 2026-09-02 |
| 2026-09-03 |
| 2026-09-04 |
| 2026-09-07 |
| 2026-09-08 |