Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Apr 24, 2019 01:51 AM
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.
Solved! Go to Solution.
Apr 24, 2019 03:29 AM
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() )
Apr 24, 2019 02:52 AM
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)
Apr 24, 2019 03:25 AM
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.
Apr 24, 2019 03:29 AM
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() )
Apr 24, 2019 03:44 AM
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.
Apr 24, 2019 03:51 AM
It works for me. Here is a quick example Base I just knocked up.
Apr 24, 2019 04:14 AM
Yes, it’s now working! I had to logout a few minutes ago though, so maybe just a refresh was in order.
Jul 22, 2021 08:33 PM
thanks. it works for me!
Nov 03, 2021 09:58 AM
Thank you! This worked for me.