参考代码
Select Case e.DataCol.name
Case "年份", "月份", "操作员"
Dim drs = DataTables("生产日报表").Select("年份 = '" & e.DataRow("年份") & "' and 月份 = '" & e.DataRow("月份") & "' and (',' + 操作员 + ',') like '%," & e.DataRow("操作员") & ",%'")
e.DataRow("操作员3月份在生产日报表中出现的次数") = drs.count
Dim sum As Double = 0
For Each dr As DataRow In drs
sum = sum + val(dr("效率"))
Next
e.DataRow("月平均效率") = sum / drs.count
End Select