Forum Discussion
Dax Formula Between Dates
- 7 years ago
Hi,
Try this measure
Measure1 = CALCULATE([Actual Cost],DATESBETWEEN('Calendar'[Date],IF(MONTH(TODAY())>=9,DATE(YEAR(TODAY()),9,1),DATE(YEAR(TODAY())-1,9,1)),IF(MONTH(TODAY())=9,TODAY(),EDATE(TODAY(),-1))))
Hope this helps.
- 7 years ago
Hi,
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.
Hi,
I would like to modify the START DATE of this Formula adding a VAR where I can set the MONTH of last Year..
MTD Actual Cost = CALCULATE([Actual Cost], // Sum Amount
DATESBETWEEN('List Period'[Date], // Based on Dates Between
Date(YEAR(EDATE(today(),-1)),MONTH(EDATE(today(),-1)),1), // Date having Year = Today -1 Month / Month = today -1 Month, and Day = 1
EOMONTH(today(),-1))) // End Of Month effective today() -1 month
I would like to put/use something like this into the Formula:
VAR FirstFiscalMonth = 9 -- Set the first month of the fiscal year
Thanks,