Forum Discussion

DanaDana's avatar
DanaDana
Qrew Cadet
8 years ago

Duration Formula with If Statement and Checkbox

I have a duration field that I only want to calculate if a checkbox is checked. I have the following formula but it's still calculating a duration even if the condition isn't met:

If(ToText([NTO Resolved in Field])="Yes",Days(0),[Contractor Resolved Date]-[Creation Date])

Can someone help me figure out what I'm doing wrong? 
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    Is your checkbox field [NTO Resolved in Field]?

    If so, try this:

    If([NTO Resolved in Field]=false, null, [Contractor Resolved Date]-[Creation Date])

    ...
  • For future reference, use TRUE or FALSE without quotes when testing the value of a checkbox