avoiding "NaN" , "infinity" in reports but not dividing by zero
hi guys, have looked @ other links in similar thread, deal dividing 0.i have formla
=iif(sum(fields!onhand.value) = 0,0,sum(cdbl(fields!onhandvalue.value))/cdbl(fields!onhand.value))
but when 2 values are
11492/1.0416
i get 11 033.026113671300000000000000000000
this comes through infinity on report.
i have change th text box formating number 2 deciimals. still same result.
any ideas why?
hi lancockcroft,
generally, issue occur when denominator equal 0 in reporting services. , based on test, create dataset 2 fields, contains value 11492, b contains value 1.0416. use expression (=fields!a.value/fields!b.value) in table, returns 11033.0261136713 result.
so think may infinity value not returned 2 values, may returned 2 values. please double check again. , can create sample dataset, test yourself, tell results.
create table #temp (a float, b float)
insert #temp values (11492,1.0416)
select * #temp
if there other questions, please feel free ask.
thanks,
katherine xiong
katherine xiong
technet community support
SQL Server > SQL Server Reporting Services, Power View
Comments
Post a Comment