Help

Prevent result from being a negative number...

Topic Labels: Formulas
Solved
Jump to Solution
2842 2
cancel
Showing results for 
Search instead for 
Did you mean: 
djgruber
4 - Data Explorer
4 - Data Explorer

Hello Airtable Community! 🙂

So... I am rather new. I have a formula that works fine, except that occassionally the result is a negative number.

How can I display the result as "ZERO" if the result is less than zero (i.e. a negative number)?

I read somewhere that MAX should do the trick... but not working.

 

 

 

IF({Total Sold}> 0, MAX({Total Sold}-({Products Completed}+{Total qty on hand})), 0)

 

 

 


P.S. As mentioned, I am new, so if you do write out a quick formula, could you please use MY actual field names? 🙂

please advise, and thank you in advance!
DJ


1 Solution

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto

I am very torn about writing this reply. You asked that replies use your actual field names. However, I am on a mobile device and trying to write out your actual field names is very difficult. This platform makes it very difficult to copy/paste text and I cannot see your post when typing my reply. So my choices are to not reply at all, or to reply without using your field names.

It looks like you are not nesting the 0 inside the MAX() formula. Instead, the zero is the third parameter of your IF() and is shown when there isn’t any total sold. In order to get the MAX() to work, you need to pot the comma and zero inside the closing parentheses for the MAX() function. 

 

MAX( {your calculation}, 0)

See Solution in Thread

2 Replies 2
kuovonne
18 - Pluto
18 - Pluto

I am very torn about writing this reply. You asked that replies use your actual field names. However, I am on a mobile device and trying to write out your actual field names is very difficult. This platform makes it very difficult to copy/paste text and I cannot see your post when typing my reply. So my choices are to not reply at all, or to reply without using your field names.

It looks like you are not nesting the 0 inside the MAX() formula. Instead, the zero is the third parameter of your IF() and is shown when there isn’t any total sold. In order to get the MAX() to work, you need to pot the comma and zero inside the closing parentheses for the MAX() function. 

 

MAX( {your calculation}, 0)

djgruber
4 - Data Explorer
4 - Data Explorer

Ahhhhh! that worked! 🙂 Thank you, Kuovonne! 😀