Forum Discussion
cristianml
Post Prodigy
7 years agoDax Formula Between Dates
Hi, I need to fix this formula. It doesn´t work. YTD MTD Actual Cost = CALCULATE([Actual Cost], // Sum Amount VAR FirstFiscalMonth = 9 -- Set the first month of the fiscal year VAR LastDa...
Ashish_Mathur
Super User
7 years agoHi,
Try this measure
Actual Cost since inception = CALCULATE([Actual Cost],DATESBETWEEN('List Period'[Date],MINX(ALL('Calendar'[Date]),'Calendar'[Date]),IF(MONTH(TODAY())=9,TODAY(),EDATE(TODAY(),-1))))
Hope this helps.
cristianml
Post Prodigy
7 years agoHi Ashish_Mathur ,
Finally it worked.. I only removed the September part leaving the formula like this:
CTD Actual Cost = CALCULATE([Actual Cost],DATESBETWEEN('List Period'[Date],MINX(ALL('List Period'[Date]),'List Period'[Date]),EDATE(TODAY(),-1)))
Thanks ! Regards.