Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago

DATESMTD not working as expected

Im using the following DAX formula to get MTD dates:
Month_tD = max('RoB_Tracking'[AutoCalc End Date]in DATESMTD(Dim_Date[AutoCalc End Date])
However DATESMTD(Dim_Date[AutoCalc End Date]) is giving me 1/07/2033. I was expecting it to give dates between 1/12/2024 to today (27/12/2024)). 
 

 

Any tips? 

1 Reply

  • Hi,

    I do not know what you are trying to do but ensure that the Date column of the Calendar table has continuous dates.  Create calculated column formulas for Year, Month name and Month number.  Sort the Month name by the Month number.  To any visual/filter/slicer, drag Dates from the Calendar table.

    Max = max('RoB_Tracking'[AutoCalc End Date])

    Measure = calculate([max],datesmtd(calendar[date]))

    Hope this helps.