Forum Discussion

KarenBrown's avatar
KarenBrown
Qrew Member
20 hours ago

Looking for formula help

I am trying to write a formula that will subtract to date fields only when certain conditions are met. The fields for the conditions are checkbox fields. The formula field I started below is numeric. This formula works without the conditions of the checkbox fields. 

If([RX Ready Date]<[Plan Set -Up  All],0,(not IsNull([RX Ready Date])),ToDays(([RX Ready Date]-[Plan Set -Up  All])))

I want to add to the formula to only subtract the dates when [Pharmacy], true and [Fast Track] is false (both checkbox fields). Any help to add in the conditions is much appreciated. 

2 Replies

  • Does this work?

    If(
      [Pharmacy] = true and [Fast Track] = false,
        If(
          IsNull([RX Ready Date]) or [RX Ready Date] < [Plan Set -Up  All],
          0,
          ToDays([RX Ready Date] - [Plan Set -Up  All])
        ),
      0
    )

    Just containing it in another If statement.