Forum Discussion
Problem with "DateAdd" as measure
- 8 years ago
I had this problem too, besides using the EDATE function you can also use the DATEADD function but you need to append .[Date] to the column containing the date.
Add To Referral Date = dateadd('FACT Services'[Service Referral Date].[Date],6,MONTH)
Add To Start Date = dateadd('FACT Services'[Service Start Date].[Date],6,MONTH)
There are other date related options to append, the complete list is
[Date], [Day], [Month], [MonthNo], [Quarter], [QuarterNo], [Year]
These options aren't in the MS DATEADD documentation.
[UPDATE:
Since posting the above reply I have learned that DATEADD generates a table, hence why using this to populate a column failed or required hacks. The correct function to use is EDATE which returns a date.
https://docs.microsoft.com/en-us/dax/edate-function-dax
https://dax.guide/edate/ ]