Help with multiple If statements in a date field

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • In Progress
  • (Edited)
I have a date field with multiple If conditions 


If(not Isnull([Override Actual Complete Date]),Override Actual Complete Date],
If([Total # of Active In-Service Tasks - Job] > 0,
     If([Total # of Active In-Service Tasks - Job] = [Total # of Active In-Service Tasks Completed - Job], [Latest Actual In-Service Complete Date - Job]),
     If([Total # of Tasks Completed - Job] = [Total # of Active Tasks - Job], [Latest Actual Complete Date - Job])
)
)
Photo of Shontay

Shontay

  • 490 Points 250 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,698 Points 20k badge 2x thumb
I cleaned up a few spots, but the logic still seems odd.  If this doesn't work for you can you describe what you want using plain english, and then we can make sure it matches.

If(not Isnull([Override Actual Complete Date]), [Override Actual Complete Date],
If([Total # of Active In-Service Tasks - Job] > 0
AND [Total # of Active In-Service Tasks - Job]=[Total # of Active In-Service Tasks Completed - Job],
[Latest Actual In-Service Complete Date - Job],
If([Total # of Tasks Completed - Job] = [Total # of Active Tasks - Job], [Latest Actual Complete Date - Job], Null)))