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

(Rich Conklin) #1

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?

(Aleksi Alkio) #2

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

(Rich Conklin) #3

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!

(Aleksi Alkio) #4

You’re welcome