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 |
|
gundi
Starting Member
1 Post |
Posted - 2011-11-29 : 03:30:05
|
| Hi I have the following:=Round((SUM(IIF(Fields!Flag.Value = "N", CDbl(Fields!Figure.Value),CDbl(0)))* 100) /SUM(IIF(Fields!Flag.Value = "T",CDbl(Fields!Figure.Value),CDbl(0)))The problem is if there are no values it return NAN. I have tryed to use Nothing but it returns an error. I am sure I am putting it in a wrong way. Can somebody assist?RegardsGundi |
|
|
sql-programmers
Posting Yak Master
190 Posts |
Posted - 2011-11-29 : 08:33:22
|
| HiTry this code=Round((SUM(IIF(Nz(Fields!Flag.VALUE,"") = "N", CDbl(Nz(Fields!Figure.VALUE,0)),CDbl(0)))* 100)/SUM(IIF(Nz(Fields!Flag.VALUE,"") = "T",CDbl(Nz(Fields!Figure.VALUE,0)),CDbl(0)))SQL Server Programmers and Consultantshttp://www.sql-programmers.com/ |
 |
|
|
|
|
|