Apr 06, 2021 02:55 AM
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}
Apr 06, 2021 06:36 AM
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!
Apr 06, 2021 07:49 AM
Thanks for your help. I finally find the good syntaxe :grinning_face_with_big_eyes: