reporting services - Divide by zero SSRS -
i need in adding logic following code handle divide 0
=iif(fields!coverage.value = 0, sum(fields!calculatedtotalincidents.value) / (reportitems!calculatedunitssold1.value), sum(fields!calculatedtotalincidents.value) / sum(fields!calculatedunitssold.value))
try this:
=iif(fields!coverage.value = 0, sum(fields!calculatedtotalincidents.value)/ iif((reportitems!calculatedunitssold1.value)<>0, (reportitems!calculatedunitssold1.value),1), sum(fields!calculatedtotalincidents.value) / iif(sum(fields!calculatedunitssold.value)<>0, sum(fields!calculatedunitssold.value),1))
Comments
Post a Comment