Invalide value : Nan in Pie chart

Viewed 102

How can I avoid getting the error "Invalid value:NaN"? I have created a Pie Chart and the values are the result of a division. I only want the chart to create if the result is not a NaN, otherwise that value should be set to zero! Can I do this in the properties of the chart itself?

I tried writing something like: try-catch. But it tells me that the value must be a double

1 Answers

you can use the function zidz(x,y) that generates the division x/y and if the division in invalid (NaN or infinity), the result is 0

Related