Forum Discussion

AshleySolomon's avatar
AshleySolomon
Qrew Trainee
2 years ago

Total Formula with 2 IF statements

I that a Total field that needs to... 1st look at a Manual entry field and pull the value it if it is populated. Caveat, if 0 is entered in the Manual field then the Total needs to be 0. So I have ...
  • MikeTamoush's avatar
    2 years ago

    There are a few ways to do this, but one thing to know is Quickbase will read a formula from top down and stop as soon as it hits a true statement. We can use this to our advantage. Below should work, assuming that only one of the 3 conditions below will be true at once OR assuming we have written it top down in order of importance (ie the formula can stop and return a value as soon as it hits the first true statement).

    If(
      [Filing Fees - Manual]=0,0,
      [Filing Fees - Manual]<>0, [Filing Fees - Manual],
      isnull([Filing Fees-  Manual]) and [Fee Schedule - Charge Filing Fee?]=true, [Fee Schedule - Filing Fees (per Filing)],
    [Fee Schedule - Charge Filing Fee?]=false,  0
     )



    ------------------------------
    Mike Tamoush
    ------------------------------