Is there any way to caculate the average of the non zero rows only for a column of data in a table in an RDLC for Microsoft report viewer?
ie 0 0 0 5 5 = 5 not 2
I tried Count( fields.n.value > 0 ) to get the count of non zero rows, but it returned the count of all rows.开发者_高级运维
Thanks!
Eric-
Try this:
=Sum(Fields!n.Value > 0) / Sum(IIf(Fields!n.Value > 0, 1, 0))
Notice how the average is computed manually by summing all values then dividing by another sum that mimics a specialized count mechanism.
精彩评论