Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Seth4040
Regular Visitor

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(

 

Screenshot 2024-06-24 113448.jpg

1 ACCEPTED SOLUTION

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

 

Screenshot 2024-06-24 123724.jpgScreenshot 2024-06-24 123745.jpg

View solution in original post

3 REPLIES 3
mark_endicott
Super User
Super User

@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.  

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

 

Screenshot 2024-06-24 122921.jpg

 

 

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

 

Screenshot 2024-06-24 123724.jpgScreenshot 2024-06-24 123745.jpg

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.