Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jbrown7232
Starting Member
22 Posts |
Posted - 2011-03-16 : 13:31:03
|
I have created a report, but i notice that i get 'NaN' and 'Infinity' in my % columnhow do i remove this from view, i.e. to return a blank fieldbelow is the formula used to populate the % column=Sum(Fields!SessionsComplete.Value)/Sum(Fields!SessionsStarted.Value) |
|
gavakie
Posting Yak Master
221 Posts |
Posted - 2011-04-11 : 17:07:02
|
use and iif statement setting it to blank. =iif(Sum(Fields!SessionsStarted.Value) = 0," ", Sum(Fields!SessionsStarted.Value)) |
|
|
ssrstips.com
Starting Member
5 Posts |
Posted - 2011-04-12 : 03:02:34
|
Is it possible one of your SUMs is 0? If so, then instead of doing risky divides like this, use Code.Divide(Sum(Fields!SessionsComplete.Value), Sum(Fields!SessionsStarted.Value))And a custom code of:Public Share Function Divide(value1 As Double, value2 As Double) As DoubleIf value2 = 0 ThenReturn ""ElseReturn value1 / value2End IfEnd Function |
|
|
|
|
|