views:

6

answers:

0

I have a result set like follows from a stored procedure and I need to calculate an aggregate count with a table in a report template. There are more columns returned but this is the caliumn for whci I need the aggreagte.

Value 10 94 20 200 90 100

and I need to calculate the number of rows where Value is < 90. So the answer should be 2.

I tried this but if I put it in a cell of a table without a group it returns 6 rows where each row is either 1 (if Value < 90) or NULL (like this: 1 NULL 1 NULL NULL NULL). I have also tried adding groups but then it seems to return one value of NULL which maybe the last rows result?

=IFF(Fields!Value.Value < 90, CountDistinct(Fields!EventID.Value), "NULL")