Showing posts with label nan. Show all posts
Showing posts with label nan. Show all posts

Friday, March 9, 2012

Expression problem

Using this expression to get the percentage of two fields. The problem is
when both fields contain values of 0 then I get 'NaN%' .
How can I rewrite the expression to give 0%
=ROUND(((SUM(Fields!P2_OPENED.Value)/SUM(Fields!P2_CLOSED.Value)) *100),2) &
"%" & vbcrlf & ""
Thanks,=IIF(SUM(Fields!P2_CLOSED.Value) <> 0,
ROUND(((SUM(Fields!P2_OPENED.Value)/SUM(Fields!P2_CLOSED.Value)) *100),2) ,
0) &
"%" & vbcrlf & ""
"cheilig" wrote:
> Using this expression to get the percentage of two fields. The problem is
> when both fields contain values of 0 then I get 'NaN%' .
> How can I rewrite the expression to give 0%
> =ROUND(((SUM(Fields!P2_OPENED.Value)/SUM(Fields!P2_CLOSED.Value)) *100),2) &
> "%" & vbcrlf & ""
> Thanks,
>