Forum Discussion

TonyR1869's avatar
TonyR1869
New Member
6 years ago
Solved

Dateadd

Hi,   if this Column formula works "3 months date = DATEADD('JobOrder (2)'[Maximum Date].[Date],-3,MONTH)"  why wouldn't  this Column formula work  " 4 months date = DATEADD('JobOrder (2)'[Maximum ...
  • v-yingjl's avatar
    6 years ago

    Hi TonyR1869 ,

    Dateadd() function returns a table that contains a column of dates, shifted either forward or backward in time by the specified number of intervals from the dates in the current context. Please note that:

    If the dates in the current context do not form a contiguous interval, the function returns an error.

    The result table includes only dates that exist in the dates column.

    For example, the date column like this, when using dateadd(), it will just return the follwing result because there is no date about 2019 exist in the already existing tables so that these columns will return blank by this formula.

    If there is a date related 2019 context exists, it will return normal results by this formula:

    For more details about Dateadd() function, please refer the microsoft document: DATEADD 

     

    Best Regards,
    Yingjie Li

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.