Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

How to add a Third Condition to an IF Formula so that if the value is negative it will return 0

Topic Labels: Formulas
Solved
372 2
cancel
Showing results for
Did you mean:
4 - Data Explorer

This is the current formula I am using;

IF({3P Impressions}>0,{Booked Revenue}-({Booked Revenue}{3P Pacing}),{Booked Revenue}-({Booked Revenue}{1P Pacing}))

But when the value returned is negative, I’d like to display “0.” The format of the field is currency.

1 Solution

Accepted Solutions
14 - Jupiter

Hi @Kristin_Cox,

I’m not sure which part of your `IF()` you want to return no less than `\$0`, so I’ll do it on both parts and you can fix as needed. You’ll want to use the `MAX()` function for this:

``````IF(
{3P Impressions} > 0,
MAX({Booked Revenue} - ({Booked Revenue} * {3P Pacing}), 0),
MAX({Booked Revenue} - ({Booked Revenue} * {1P Pacing}), 0)
)
``````

`MAX()` will make it so that if the result of your equation is less than `0`, it will return `0` instead.

2 Replies 2
14 - Jupiter

Hi @Kristin_Cox,

I’m not sure which part of your `IF()` you want to return no less than `\$0`, so I’ll do it on both parts and you can fix as needed. You’ll want to use the `MAX()` function for this:

``````IF(
{3P Impressions} > 0,
MAX({Booked Revenue} - ({Booked Revenue} * {3P Pacing}), 0),
MAX({Booked Revenue} - ({Booked Revenue} * {1P Pacing}), 0)
)
``````

`MAX()` will make it so that if the result of your equation is less than `0`, it will return `0` instead.

4 - Data Explorer

This works. Thank you so much!