Quantcast
Channel: BIRT Exchange Forum Feed
Viewing all articles
Browse latest Browse all 542

change NaN value to another value

$
0
0
Hi,

I want to create a computed column in a data set, which is the ratio of 2 output columns
I wrote an expression to change possible NaN result due to division by 0, but I still have NaN as a result.

Here is my expression :

value = new Number(row["C1"]/(row["C2"])*100);
if(value == Number.NaN)
{
value = 100;
}
value;

Any solution ?

Viewing all articles
Browse latest Browse all 542