I am using the following expression in one of my reports:
=Iif(fields!occ.Value=0,0,Sum(Fields!RIemps.Value) / Sum(Fields!occ.Value))
The calculation is working for some of the fields but not for others. When I replace the second "0" with Sum(Fields!occ.Value) then the occupancy works and the calculation runs as it should providing the occupancy value as stated:
=Iif(fields!occ.Value=0,Sum(Fields!occ.Value),Sum(Fields!RIemps.Value) / Sum(Fields!occ.Value))
When I reverse the query, the fields which were working do not and the the ones that were not, now work:
=Iif(fields!occ.Value=0,Sum(Fields!RIemps.Value) / Sum(Fields!occ.Value),0)
I cannot get all fields to work consistently, it is either one or the other. Any thoughts on what might be triggering the inconsistency in the expression?