SSRS IIF Statement Divide by Zero Error

Who is online?  0 guests and 2 members
Home  »  Blogs  »  DustinRyan  »  SSRS IIF Statement Divide by Zero Error
 
0
/5
Avg: 0/5: (0 votes)

Comments (7)

timmurphy
timmurphy said:
I ran into that problem last week. Check my blog about percent with another possiblity.
4/21/2010
 · 
 
by
hermandup
hermandup said:

I came up with the same solution, however when you work with a lot of data, the extra sum() slows down processing time. I've not come up with any other ideas though....

5/20/2010
 · 
 
by
hermandup
hermandup said:

I came up with the same solution, however when you work with a lot of data, the extra sum() slows down processing time. I've not come up with any other ideas though....

5/20/2010
 · 
 
by
jadionne
jadionne said:

I ran into this issue, but it seemed to be a data type issue.  Check out the code below, this is working for me

 

=IIF(CINT(Fields!NEWCLICKCOUNT.Value) = 0, "N/A", IIF(CINT(Fields!UNITS.Value) = 0, "N/A", CINT(Fields!UNITS.Value)/CINT(Fields!NEWCLICKCOUNT.Value)))

10/5/2010
 · 
 
by
briankmcdonald

When in doubt, do it at the source query! If you are using the ReportItems collection however, this can be an even bigger issue.

10/5/2010
 · 
 
by
Daniel
Daniel said:

I get around this by putting a public function in the Report Properties >> Code window.  The first blog I ever wrote here on BIDN. Smile

http://www.bidn.com/blogs/Daniel/ssas/1245/divide-by-zero-tweak

8/1/2011
 · 
 
by
DustinRyan
DustinRyan said:

Cool, thanks, Daniel.

8/1/2011
 · 
 
by
Blogs RSS Feed

DustinRyan's latest blog posts

Blogs RSS Feed

Latest community blog posts