jschill2628
Programmer
I have a formula:
if isnull ({@Serious Event Count}) or ({@Serious Event Count}) = 0 then "0" else
totext(sum({@near miss count})/sum({@Serious Event Count}),0,"")
and when I run the report, it seems to be pulling only zero. For example if I have 9 serious safety events, and 27 near miss events, then my ratios should be 1 and 3 respectively, but I am getting 1 and 0. It works if I comment out the first line, but then if I have a situation where I am dividing by zero, then i get an error, so what should I do, I feel like I should rearrange the formula some how, but I am not getting it. I have played with this for hours, and I am getting the same thing. can some one please help. I need the formula to give me the number, and if the number is being divided by zero, then give me a zero.
Thanks in advance!!!
if isnull ({@Serious Event Count}) or ({@Serious Event Count}) = 0 then "0" else
totext(sum({@near miss count})/sum({@Serious Event Count}),0,"")
and when I run the report, it seems to be pulling only zero. For example if I have 9 serious safety events, and 27 near miss events, then my ratios should be 1 and 3 respectively, but I am getting 1 and 0. It works if I comment out the first line, but then if I have a situation where I am dividing by zero, then i get an error, so what should I do, I feel like I should rearrange the formula some how, but I am not getting it. I have played with this for hours, and I am getting the same thing. can some one please help. I need the formula to give me the number, and if the number is being divided by zero, then give me a zero.
Thanks in advance!!!