I am using it in a matrix report which displays the percentage % calculation for project hours of a department. There might be where a department has no project hours clocked and I would like to output 0% Can anyone help? IsNan PercentageExpression , 0, PercentageExpression i. Hi All, I would like to ask regarding the IsNan function. This function also returns a Boolean value indicating whether an expression can be evaluated as a number. For example, dividing zero by zero results in a NaN — but dividing other numbers by zero does not. Note that the method is associated with System.
The resulting value is then tested to determine whether it is. Origin of NaN values NaN values are generated when arithmetic operations result in undefined or unrepresentable values. Syntax isNaN v alue Parameters value The value to be tested. Actually, isNaN x , isNaN x - 0 , isNaN Number x , Number. How is it used and what is its output? I am using it in an if statement and cant seem to get a result.
Hope that helps in clarifying concepts. True if the Expression evaluates to not a number; otherwise, false. Regards, Jerry Fadzli, Not sure if there is a IsNan function that you can use as an expression. Such values do not necessarily represent overflow conditions. IsNumber itself returns true or false whether the value of a field is a number or not. Value Regards, Subir Sankar Das.
Alternatively, in absense of Number. Confusing special-case behavior Since the very earliest versions of the isNaN function specification, its behavior for non-numeric arguments has been confusing. Edit: Not sure if you need that Not in the front. . IsNan sum expression , 0, sum expression A question: what value does IsNan returns? Regards, Syed Mehroz Alam Hi Fadzli, The Double.
If it returns true, x will make every arithmetic expression return NaN. Hence, the necessity of an isNaN function. When the argument to the isNaN function is not of type , the value is first coerced to a Number. I went and search around on the net and found something similar to what Syed did. . . .
. . . . . . .
. . . . . .
. . . . . .