Forum Discussion
DavidWaters100
Post Patron
6 years agoDATESMTD less one day problem
Hi, I have a month slicer which users can select, then a measure using DATESMTD to capture all sales in the chosen month. However I now have a requirement to capture DATESMTD minus 1 day. So if...
amitchandak
Super User
6 years agoDavidWaters100 , first one should work
Sales= Calculate(sum(Sales[Amount]),DATESMTD(dateadd('Calendar Table'[Date],1,day)), Sales[Status]="Type A")
If not try
Sales= Calculate(sum(Sales[Amount]),DATESMTD(dateadd('Calendar Table'[Date],-1,day)), Sales[Status]="Type A")
- DavidWaters1006 years ago
Post Patron
Hi amitchandak,
Thank you for your reply - this should work for the YTD too (I posted a second reply to my own post as I realised I had a problem with YTD too).
I will give it a try