Quantcast
Channel: SQL Server Reporting Services, Power View 포럼
Viewing all articles
Browse latest Browse all 24955

Expression Help Needed with IIF statement. 0 value showing as NaN, Unsure how to write expression

$
0
0

Currently my expression is :

=((((Fields!OSHA_RECORDABLES.Value))*200000)/(sum(Fields!EMPLOYEE_HOURS.Value)))
 

but when the employee hours are zero, the results of the calculation is NaN or #error!

So I tried to add

=IIf(Sum(Fields!NewCount.Value) = 0, "0", Sum(Fields!NewCount.Value))

Where the Sum(fields...) is my expression above, but I cannot seem to bring the two together properly as I get an error upon running the report.  How do I go about changing the expression so that 0.00 appears instead of NaN?

Thank you





Viewing all articles
Browse latest Browse all 24955

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>