TOTALMTD
An expression evaluated over the month to date.
Group: Time intelligence. Compatible with DAX.
Syntax
TOTALMTD ( <expression>, <dates> [, <filter>] )
| Parameter | Type | Description |
|---|---|---|
expression | Expression | The value wanted, usually a measure; it is evaluated with the dates as its filter. |
dates | Dates | A column of dates of the model, such as Sales[Month], or the name of a calendar defined in the model. |
filter | Filter 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 month to date.
Remarks
- It is
CALCULATE ( expression, DATESMTD ( dates ) ), with the filter added when one is given. - The month is the one of the last date in the filter context; on a column with one date a month the total is just that month's, so it is meant for daily dates.
- A filter on another column of the same table (a month or a year column next to the dates) stays in place. Where the dates column links a date table to the facts, a filter on it replaces the filters on the rest of that table, so results by year and month name add up as expected.
- 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
Volume traded, month to date
Hops in the first days of September 2026.
EVALUATE
CALCULATETABLE (
ADDCOLUMNS (
DATESBETWEEN ( Prices[Date], DATE ( 2026, 9, 1 ), DATE ( 2026, 9, 8 ) ),
"Volume", [Volume traded],
"Month to date", TOTALMTD ( [Volume traded], Prices[Date] )
),
Prices[Commodity] = "Aroma hops"
)
ORDER BY Prices[Date]
| Prices[Date] | Volume | Month to date |
|---|---|---|
| 2026-09-01 | 324 | 324 |
| 2026-09-02 | 313 | 637 |
| 2026-09-03 | 413 | 1050 |
| 2026-09-04 | 205 | 1255 |
| 2026-09-07 | 363 | 1618 |
| 2026-09-08 | 184 | 1802 |