=iif((Fields!MeasureID.Value = 1 or Fields!MeasureID.Value = 16) and NOT
Fields!Key.Value = 999, round(Avg(Fields!CY_Rate.Value),0),
iif((Fields!MeasureID.Value = 19 or Fields!MeasureID.Value = 20
or Fields!MeasureID.Value = 21 or Fields!MeasureID.Value = 22
or Fields!MeasureID.Value = 23 or Fields!MeasureID.Value = 24) and NOT
Fields!Key.Value = 999, round(Avg(Fields!CY_Rate.Value),0) & "%",nothing))
"dela" <de...@discussions.microsoft.com> wrote in message
news:FDA1A48B-020A-406D...@microsoft.com...
It might be easier to add a couple columns (COL_1, COL_2) to your
dataset. I would use the CASE statement to derive each column. You
would place all the logic from your IF statement into the CASE
statement.
If true, then COL_1 would return cy_rate.value, else it would return
0.... also, if TRUE, then COL_2 would return 1, else it would return
0.... Then in your report, SUM(COL_1)/SUM(COL_2) should be the average
you are looking for... just add a little logic to avoid dividing by
zero...
HTH,
Mark