Forum Discussion
DATEADD DAX FUNCTION
I am facing a challenge while using “DATEADD” DAX function. Below is the function I am using
DATEADD('This Month'[Today].[Date],3,Month).
Column “'This Month'[Today]” contain date as “21 oct 2020”, NumberOfIntevals=3, Interval= Month
When I use NumberOfIntevals as 1 it returns me date as “21 Nov 2020” so no issue so far
When I use NumberOfIntevals as 2 it returns me date as “21 Dec 2020” again no issue
But when I use NumberOfIntevals as 3 it returns me “Blank” no value neither error.
Pls help if you already have a solution
@Theamitbhardwaj , Dateadd requires a continuous date in the table. So if the date isn't present, it won't give the right answer
you can use the date instead of dateadd as
Add four months
=
var _date to today()
Return
date(year(_date), Month(_date)+4, day(_date))
1 Reply
- amitchandakSuper User
@Theamitbhardwaj , Dateadd requires a continuous date in the table. So if the date isn't present, it won't give the right answer
you can use the date instead of dateadd as
Add four months
=
var _date to today()
Return
date(year(_date), Month(_date)+4, day(_date))