0
votes

I have values in a column (col 3) in ssrs report which is a calculation of two other columns. The calculation is col3 = col1/col2 where i set col3 to nothing if col2 is 0. e.g. iif(col2 = 0,nothing,col1/col2) However the col3 should show blank values in report but it shows 0. The format of col3 is given as "#,0.0%;(#,0.0%)" Is There any way to display the values as blank when col2 is 0 ?

1
Looks like this is the likely solution. stackoverflow.com/questions/14606390/…GregHNZ
Are you sure this is a problem when col2 is zero? IIF doesn't short circuit in SSRS, so a zero there should be giving you divide by zero errors.stubaker

1 Answers

0
votes

Yup i found the solution..The solution was not in the syntax but in the format in which i put the solution in expression dialogue box of ssrs.

Initially my solution was :

= iif(col2 = 0,nothing, +   
col1/col2) 

Later I changed my solution to :

= iif(col2 = 0,nothing,col1/col2) 

It worked !