Help

Division Formula

9507 9
cancel
Showing results for 
Search instead for 
Did you mean: 
Kelli_Oshel
4 - Data Explorer
4 - Data Explorer

I cannot seem to get a simple division of two fields to work. What am I missing? My goal is to find the percent utilized. January hours scheduled divided by the total number of work hours in Jan. Both of these fields are themselves a calculated value, not sure if that matters.

My formula looks like:

JanuaryTotalHoursBooked/JanMonthlyAvailHours

The formatting tab is set to percentage. (returns error with integer too)

It returns #errror!

Thanks

9 Replies 9
Alex_Wolfe
8 - Airtable Astronomer
8 - Airtable Astronomer

Perhaps it has something to do with the format of the two fields you are dividing - what format are those calculated fields?

The two fields are both formula fields - integer formatting. So the values are like 120/176. And really it should be (120/176)*100 = percentage

Can division be done on formula fields? How might I work around that if that’s the case?

Thanks!

There shouldn’t be a problem with those fields, Double-check you’re pulling the fields you think you are, that they are indeed integers, and you have no duplicate names. And {JanMonthlyAvailHours} isn’t 0, it?

They are not duplicated names.
The avail hours is not 0. This is the formula in that column - IF({WeeklyHours} =40, “176”, “120”) If weekly hours are equal to 40, then 176. Else 120. Is what I was going for. It does populate the right values.

This might be where the issue is. The other field is an integer, but this one (JanMonthlyAvailHours) gives me this message on the Formula Formatting tab “Your result type is not a number or a date. Formatting options are currently only available if your result is a number or a date.”

176 and 120 are integers, but maybe I do not have the right syntax?

Thanks for your help! I just started looking at AirTable this week for a specific need we have. I’m nearly there to say Yes! This tool can work.

IF({WeeklyHours} =40, "176", "120") does not give you an integer; it gives you a string.

You want

IF({WeeklyHours} =40, 176, 120)

That should allow your division to happen error-free.

Yes! That fixed the problem! Thank you!!

Hi, my formula is this= {Time in seconds}/3600 and it still returns as error. What am I doing incorrectly?

@Norlin_Sunga can you post your full formula. There’s nothing wrong with the snippet you posted, so the error you are getting is likely from the surrounding context of the snippet you posted.

I actually found a workaround. It is because the dividend is a string and not an integer. Thank you!