Have a field that is calculating the scrap percentage of a part over a date range and is working fine except for when scrap is 0. I wrote an if statement to say if scrap is 0 display 0. Still shows Error
Unfortunately SSRS does this great thing where it evaluates both the true and false conditions, which leads to errors when guarding against divide-by-zero.
The following tries an extra conditional and sets the divisor to 1 instead of 0 if it is 0, bypassing the divide-by-zero error. (I think I typed it in right)
That did solve the error and the output was 0 but the other fields were no longer correct being 100x larger. Much easier to solve that problem! Thank you.
EDIT:
Now that I am no longer trying to figure out why the error is happening I realize how awfully wrong my equation also was.