How to convert NaN value to 0

I would like to convert NaN value to 0 when I do calculation in weweb.

Which function I should use ?

Many thx for the help

Wrap if with

if(isNaN(myResult), "0 %", myResult + " %")

IsNaN is not recognized as a function by weweb.

CleanShot 2024-02-22 at 16.20.50@2x

Because we didn’t make it a formula but it’s not an issue as it is a valid javascript function, it should work, what do you get ?

I guess your field is a “Number” field, right? You must remove the %-sign in Alexis’ solution. Then it should work.

1 Like

It’s working ! Thx all