To get the average for records that contain a value greater than 0, the below expression was created. If the average produces a “NaN” it displays “---“ instead on the report.
=IIf((Sum(IIf(Fields!DX_001.Value>0,Fields!DX_001.Value,Nothing))
/ Sum(IIf(Fields!DX_001 > 0, 1, Nothing)))="NaN", "---", (Sum(IIf(Fields!DX_001.Value>0,Fields!DX_001.Value,Nothing))
/ Sum(IIf(Fields!DX_001.Value > 0, 1, Nothing))))
I do not know how to format the result to display just two decimal places. I have placed “0.00” in the Number Format property, but this does not work.
Our community of experts have been thoroughly vetted for their expertise and industry experience.