OpenBI Docs Buy

TOTALMTD

An expression evaluated over the month to date.

Group: Time intelligence. Compatible with DAX.

Syntax

TOTALMTD ( <expression>, <dates> [, <filter>] )
ParameterTypeDescription
expressionExpressionThe value wanted, usually a measure; it is evaluated with the dates as its filter.
datesDatesA column of dates of the model, such as Sales[Month], or the name of a calendar defined in the model.
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 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]VolumeMonth to date
2026-09-01324324
2026-09-02313637
2026-09-034131050
2026-09-042051255
2026-09-073631618
2026-09-081841802

DATESMTD, TOTALQTD, TOTALYTD, CALCULATE.

Last updated · OpenBI Studio 0.3.74