Hello Everyone! I'm new to AppSheet and this ...

Hello Everyone! I’m new to AppSheet and this is my first post.

I have a TAX column to calculate and add sales tax to the total. I live in a state that does not use sales tax but I would be regularly be working in a state that does have sales tax. I am trying to learn how to use the expressions to do something like this pseudo code:

If [ADDRESS] contains “WA”, calculate [TOTAL MATERIALS] + [TOTAL LABOR] + [TAX] = [TOTAL], otherwise calculate [TOTAL MATERIALS] + [TOTAL LABOR] = [TOTAL]

I know the syntax above is incorrect, I just wanted to made it readable. Does anyone have a suggestion of how the expression should actually look to work?

Thank you in advance!

0 6 349
6 REPLIES 6

IF(CONTAINS([ADDRESS],“WA”),[TOTAL MATERIALS] + [TOTAL LABOR] + [TAX],[TOTAL MATERIALS] + [TOTAL LABOR])

Thank you Aleksi! That got me pointed into the right direction! I modified it a little bit and posted what worked below:

After adding a new column called STATE, I added buttons for the two states I was concerned with and then used this in the app formula:

IF(CONTAINS([STATE], “WA”), (([TOTAL MATERIALS] + [TOTAL LABOR]) * 0.0825, 0)

I also added a “show if” statement so the Tax line on the form will only be visible if it is being used.

Thank you again!

You’re welcome

Thanks for reminding us Seattle-ites that WA state does have sales taxes :]

@praveen

Yea, Sorry about that! Not sure wich would be worse, Income tax or a sales tax. Oregon has the Income tax. Every few yeas someone gets the idea to ADD a sales tax on to of it. So I guess it could be worse!

Top Labels in this Space