The Airtable Community will undergo scheduled maintenance on September 17 from 10:00 PM PST to 11:15 PM PST. During this period, you may experience temporary disruptions. We apologize for any inconvenience and appreciate your understanding.

# How to get rollup to ignore NaN

Topic Labels: Formulas
Solved
7398 8
cancel
Showing results for
Did you mean:
5 - Automation Enthusiast

I want to use a rollup to get an average of the existing numbers, but not all the fields in the column I want an average from have an existing number and return NaN. I want the rollup to ignore NaN.

1 Solution

Accepted Solutions

Have you tried putting this in the function column (in the table you are rolling up from)?

IF( ISERROR( x/y )=0,x/y, BLANK() )

8 Replies 8
9 - Sun

You can use the ISERROR() function combined with an IF statement. Something like:

IF( ISERROR(AVERAGE(values))=0, AVERAGE(values), BLANK() )

(Check this for formatting errors when you try it)

5 - Automation Enthusiast

Unfortunately that didn’t work - just got a fully blank column.

Maybe more context will help! I have one tab that has a function column =x/y, and in another tab I need the average of these as part of a rollup. I have tried using blanks where it returns “NaN”, but the rollup continues to return NaN regardless, I think because the “” is forced, but I have no idea.

Have you tried putting this in the function column (in the table you are rolling up from)?

IF( ISERROR( x/y )=0,x/y, BLANK() )

5 - Automation Enthusiast

Yep, full column comes up blank and the formula automatically turns into IF( ISERROR( x/y )=0)) only - just gets rid of the rest of the formula after saving.

9 - Sun

It works for me. Here is a quick example Base I just knocked up.

5 - Automation Enthusiast

Yes, it’s now working! I had to logout a few minutes ago though, so maybe just a refresh was in order.

thanks. it works for me!

4 - Data Explorer

Thank you! This worked for me.