Here is the problem I am in getting into.
I have a field that is a Expression field. I am calculating the margin. My first problem is that I was trying to divide by zero. So I thought I would use an IIF statement. When I do that I am still getting #Error as a result on the fields with a value of zero. Below is the formula I am using.
=FormatPercent((Sum(Fields!Sales.Value) - Sum(Fields!Cost.Value))/Sum(Fields!Sales.Value))
Sum(Fields!Sales.Value) -- this field is the one that has a value of zero in some cases. So on those instances the value that shows up is #Error.
If I take away the the divide by the Sum field the report doesn't show and #Error as a result.
I am looking for any help.
Thanks
I have a field that is a Expression field. I am calculating the margin. My first problem is that I was trying to divide by zero. So I thought I would use an IIF statement. When I do that I am still getting #Error as a result on the fields with a value of zero. Below is the formula I am using.
=FormatPercent((Sum(Fields!Sales.Value) - Sum(Fields!Cost.Value))/Sum(Fields!Sales.Value))
Sum(Fields!Sales.Value) -- this field is the one that has a value of zero in some cases. So on those instances the value that shows up is #Error.
If I take away the the divide by the Sum field the report doesn't show and #Error as a result.
I am looking for any help.
Thanks