Forum Discussion

Seth4040's avatar
Seth4040
Regular Visitor
2 years ago
Solved

DATEDIFF and IF

I am trying to add 7 days to the "Task Completion Date" if the "Task Status" is = CONCOMP which gives me the "GF Job Card Due Date" column.  Thank you.

 

GF Job Card Due Date = IF(DATEDIFF(

 

  • Ok got it fixed and attached what I got it to.  Thanks for your help.

     

3 Replies

  • Seth4040 - Try this as a calculated column:

     

    IF( Table[Task Status] = "CONCOMP", SUMX( Table, Table[Task Completion Date] + 7), Table[Task Completion Date])

     

    If you only need the values where 7 days have been added then this will work:

     

    SUMX( FILTER(Table, Table[Task Status] = "CONCOMP"), Table[Task Completion Date] + 7)

     

    The above can also be used in a measure. 

     

    If either of these work, please accept this as the solution.  

    • Seth4040's avatar
      Seth4040
      Regular Visitor

      This kind of worked but showing the date as 12/31/9999 for some reason. I did change the first one just a little and got what I am showing.  The second one had the same outcome exect dates in all the fields even when not = to CONCOMP  and again the dates were 12/31/9999

       

       

       

      • Seth4040's avatar
        Seth4040
        Regular Visitor

        Ok got it fixed and attached what I got it to.  Thanks for your help.