Link to home
Start Free TrialLog in
Avatar of tracim
tracim

asked on

XML Returning NaN

How do I return a zero or even a blank instead of "NaN"?  If my @phoneIns and @ScheduledVisitsPhoneIns are 0 I'm getting the NaN

     <xsl:if test="@Period = '1' ">
       <td style='text-align:right;'><xsl:value-of select="round((@PhoneIns) div  (@ScheduledVisitsPhoneIns))" /> :1;</td>
      </xsl:if>

Thanks!
Avatar of oheil
oheil
Flag of Germany image

Division by 0 is undefined hence Not A Number.
Check for @ScheduledVisitsPhoneIns = 0 and it it is zero create the result you like.

Oli
ASKER CERTIFIED SOLUTION
Avatar of oheil
oheil
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tracim
tracim

ASKER

Thank you!