Problem Formula and NaN

Hello everyone !

I have to calculate the cost of a product. It can be made of Tissu, Wool or both.

The problem comes from the “total” columns with a Formula field. When I have some empty fields, the “total” field shows “NaN” because it divides by 0.
I can’t write the formula to avoid this.
Does anyone have a solution?
Thank you in advance,

My formula :
IF({Prix Tissu}=0, {Prix Tissu}/{Nb par tissu}=0){Prix Tissu}/{Nb par tissu}

Hi. You want something like the following.

IF(AND({Prix Tissu},{Nb par tissue}), {Prix Tissu}/{Nb par tissu})

The AND part is saying that all of the arguments need to be not empty. If that is true, then the division can take place. Otherwise, return nothing. No NaN will be displayed.

Good luck!

1 Like

Thanks for your help. I finally find the good syntaxe :smiley: