So i am working on a scenario wherein i need to calculate the Previous MTD till current Date.
My MTD Formula = IF(ISBLANK([TotalSales]),BLANK(),CALCULATE([TotalSales],DATESMTD(MasterCalendar[FullDate2]))) PMTD formula till current date = CALCULATE([MTD Sales 1],DATEADD(FILTER(DATESMTD(MasterCalendar[FullDate2]),MasterCalendar[FullDate2] <= [LatestDay]),-1,MONTH))
Here Latestday is the model’s refresh date which would be always one day prior to today.
When i use the above PMTD calculation it returns me entire previous months MTD value but when i replace the <= sign with = it gives me correct value for that particular date. It would be great if some one can help with the minor fix that needs to be for this DAX
screen shot attached