Will F
Will F

Reputation: 437

Calculated field in SSRS

I have tried to create a calculated field that will show the number of customer transactions processed within 15 minutes.

I have added the expression:

=count(fields!wait.Value<15)

However, when I run the query I'm getting the error message : 'expression used for the calculated field includes an aggregate RowNumber...'

Can you advise please on how to create a calculated field so I can capture the value I want?

I have tried = SUM(IIF(Fields!wait.Value < 15 , 1, 0)) to no avail.

With many thanks.

Upvotes: 0

Views: 993

Answers (1)

Jeffrey Van Laethem
Jeffrey Van Laethem

Reputation: 2651

Calculated fields added to datasets can't have aggregate functions. The calculated field is essentially adding an extra column to your dataset. It sounds like you may want a variable? Used elsewhere in the report, your second expression would work, or the similar

=Count(IIf(Fields!wait.Value<15, 1, Nothing))

would work too.

Upvotes: 1

Related Questions