Forum Discussion

MichaelBlack's avatar
MichaelBlack
Qrew Trainee
5 years ago

Need help with an If, then formula

I am attempting to calculate the sales tax based on some different conditions.

If([Tax Exempt]=false, [Sub Total]*0.0725, ([Rebate Used from Last Month?]="No" & [Tax Exempt]=false), [Grand Total]*0.0725)

First off, when this is used, it shows my Sales Tax field as blank. Whenever I go into edit it, it will show no yellow errors, but when I save it, I get a popup stating that a closed parenthesis is missing. Any help would be greatly appreciated.

3 Replies

  • One issue is that you are using the same [Tax Exempt]=false in both parts of your IF statement; so for a record where that is true; your formula is never getting past the 1st statement.  There are also other issues with your formula.

    Try a Case() statement alternative:

    Case(true,
    [Rebate Used from Last Month?]="No" and [Tax Exempt]=false,[Grand Total]*0.0725,
    [Tax Exempt]=false, [Sub Total]*0.0725
    )

    Note that when Tax Exempt is true; you do not have any calculation being made.
  • Thank you so much! It worked! I tried the Case function, but I didn't have the 'true' part there at the beginning.
    • LauraThacker's avatar
      LauraThacker
      Qrew Captain
      Recently, Brian Caferelli from Quick Base posted this really helpful formula-generator application for users. 

      https://team.quickbase.com/db/bpjkmt63s

      I am sure that you will find this helpful; I do and I have been using Quick Base for 14 years already.