Help

Formula to compute two required fields that are greater than 0

Topic Labels: Formulas
117 3
cancel
Showing results for 
Search instead for 
Did you mean: 
ckanayag
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello everyone!

I need help with a formula that computes two fields as {field 1}/{field 2}.

However, the base is new for my team, and we're working to input backdated data, so some records that use these fields are 0 (zero), at the moment. The formula field that computes the two fields is used on current data, and we'd love to eliminate the infinity returns so as not to interrupt the SUMs we use in other areas of our work.

I've played around with several iterations of the formula and solved one to lose another 🤪 

The current formula I'm using to keep us sane in the interim is:

IF({KGM 500 Total Attendance}>0,
{KGM 500 Total Attendance}/{KGM 500 Total Capacity})
 
Attached is a screen shot of the fields in the base for reference. As we work to gather missing data, Total Attendance may be inputed first or second to Total Capacity. When the missing data is entered, both fields will have a number greater than 0, I want the Formula Field to compute {KGM 500 Total Attendance}/{KGM 500 Total Capacity}, but to only perform it when both fields have their inputed data.
 
*Note the two fields will always be 0 until/unless alternate numbers are inputed into the record's fields
 
Thanks for any and all help! 
3 Replies 3
VikasVimal
6 - Interface Innovator
6 - Interface Innovator

You could just enclose the formula as If(formula<1(meaning less than 100% or whatever makes sense),formula)
it'll skip any value over 100% or 1, and return the proper values.

You may also use this helper: https://chatgpt.com/g/g-jw51xdpVz-vik-s-formula-helper

The Chatgpt responded with this:
IF(
AND(
{KGM 500 Total Attendance} > 0,
{KGM 500 Total Capacity} > 0
),
{KGM 500 Total Attendance} / {KGM 500 Total Capacity},
BLANK()
)

Does this look right?

Screenshot 2025-01-04 at 5.51.54 PM.png

IF(
  AND(
    {Field 1},
    {Field 2} 
  ),
  {Field 1}/{Field 2}
)

Hi,
in your case,  easiest way is:

IF({KGM 500 Total Attendance}*{KGM 500 Total Capacity},
{KGM 500 Total Attendance}/{KGM 500 Total Capacity})