Help

Re: If/then formula

2448 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Shirley_Kawafuc
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello, I want to calculate the total cost per tickets ONLY IF they are a specific type, and then I want to deduct that from a total amount that I set manually. My fields are currently set up: 

Total tickets (# field)
Per ticket cost ($ currency)
Total cost (simple formula: {Per ticket Cost}* {Total Student tickets}) 
Revenue source (single line text)

Right now, I have "IF({Revenue Source}="X", {Total cost}-40,000)", but it's returning 0. Any tips? Thank you!! 

6 Replies 6
TheTimeSavingCo
18 - Pluto
18 - Pluto

Any chance you could share a screenshot so I can help with troubleshooting?  Or if you could provide a link to a base with example data that would be excellent

Hey @Shirley_Kawafuc!

I think that the comma in your 40,000 value could be causing unexpected problems.
Try this:

IF(
    {Revenue Source} = "X",
    {Total cost} - 40000
)
Shirley_Kawafuc
5 - Automation Enthusiast
5 - Automation Enthusiast

Thank you so much @Ben_Young1 and @TheTimeSavingCo! Removing the comma fixed the formula. I'd like the "Deduct Formula" column to continue subtracting from my set total of $40,000 budget IF there is a "Total cost" associated with student tickets (see screenshot). By chance do you know to achieve this? Do I need to add a hidden column that holds just the set budget amount? 

Hey @Shirley_Kawafuc, are you looking to get something along the lines of this?

Snag_6c60df.png

Shirley_Kawafuc
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi @Ben_Young1 , yes! The only change is: I want the "Remaining Budget" amount to get smaller and smaller as the total costs accrue, instead of each line starting over from $40,000 every time. 

Shirley_Kawafuc
5 - Automation Enthusiast
5 - Automation Enthusiast

Weirdly, for some reason, my Deduct formula column isn't working now. In screenshot, you'll see the amounts it's giving are incorrect. I have the formula set up like:

 

IF(
{Revenue Source} = "Student ticket Campaign",
{Total cost} - 44,899
)