Forum Discussion
Problem with function "DATEADD"
- 5 years ago
Hi Syndicate_Admin ,
Which connection mode does the data source you connect to adopt? For the DATEADD function, if it is in the Direct query mode, there may be performance problems, leading to errors.
Here is the reference document link:DATEADD function (DAX) - DAX | Microsoft Docs
Please make sure to use this function correctly and change the connection mode before trying again. If the problem is still not resolved, please let me know immediately, looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Syndicate_Admin , Dateadd work on date.
so [Date].mes is not correct.
Also, prefer to date table in such case
example
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
if needed you can use date as date add