0
votes

I am taking a stab at a report that is fairly difficult for me - so be patient with the newbie. I am looking to get an average amount of each feetype (the designated column is CODE) charged on each permit type issued. The Expression I have written -- in many forms -- follows.

 =AVG(IIF(Fields!CODE.Value="CODE-PERMIT",Fields!PAID_AMOUNT.Value),"FEES")

FEES is the dataset. I have also used the Tablix and the Group as the scope.

I know I am missing something important because I get this error:

The Value expression for the textrun ‘Textbox582.Paragraphs[0].TextRuns[0]’ has a scope parameter that is not valid for an aggregate function. The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a dataset.

Any help would be much appreciated.

1

1 Answers

1
votes

Try:

=AVG(IIF(Fields!CODE.Value="CODE-PERMIT",Fields!PAID_AMOUNT.Value,Nothing),"FEES")

Note IIF() function takes three arguments.

Let me know if this helps you.