DAX Function Guide

DATESMTD
Empty image or helper icon

Sam McKay

CEO & Founder

How does the DATESMTD work?
The DATESMTD function (DAX) returns a table that contains a column of the dates for the month to date, in the current context.
DATESMTD Formula Syntax

DATESMTD(
     <dates>
)

How do you use the DATESMTD?

The DATESMTD function can be used to calculate the running total for the month for the given day number.

Related Blog Posts

Loading

Considerations when using the DATESMTD?

The dates argument can be any of the following:

  • A reference to a date/time column.
  • A table expression that returns a single column of date/time values.
  • A Boolean expression that defines a single-column table of date/time values.
Related Video Tutorials

Loading

Formula examples using the DATESMTD

=CALCULATE(SUM(InternetSales_USD[SalesAmount_USD]), DATESMTD(DateTime[DateKey]))

=CALCULATE(Sum(Sales[Revenue]),DATESMTD(Sales[Date]),AllExcept(Sales,Sales[Product])).

= CALCULATE ( SUM (Sales [Sales Amount]), DATESMTD (Sales [Date]) )

Related Courses

Loading