troubleshooting Question

SSRS "If - then - else" formula #error

Avatar of Erin Leale
Erin LealeFlag for United States of America asked on
SSRSMicrosoft Server OSMicrosoft SQL Server
4 Comments1 Solution13 ViewsLast Modified:
Hello!
I'm new to SSRS - using - Report Builder 3 with Epicor.  I have a formula that should prevent a divide by 0 error.  

=iif(Fields!Calculated_Inv_Margin.Value = 0, 0,
sum(Fields!Calculated_Inv_Margin.Value)/sum(Fields!Calculated_Revenue.Value))

It does the percent calc great - but anything with a 0 gets an #Error.  So I took out the divide calc and just had the revenue field show - that works.  Why doesn't the the calc above just give me a 0?



Any help would be great!  Thank you! 
ASKER CERTIFIED SOLUTION
Erin Leale
IT Project Manager

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros