# question

asked

## SSRS Matrix Report Calculation

I have a matrix report and at the end i have two calcs. Avg of 12 months and Sum of 12 months - no big deal... - it's a so Rolling Month 12, 11, 10, 9 ~1 How can I calculate the most recent month / Average Sales using a matrix report.... The underlying db is using sql 2000 If YRMonth = MaxYearMonth = Then Average/Max(YearMonth) I've tried =Avg(Fields!Sales.value)/SUM(IIF(Fields!Month.value=MAX(Fields!Month.value),Fields!Sales.value,0)) with no luck. Thanks... SSRS 2008 R2
1 comment

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

·
@siera_gld You did not mention where you want to show this calculation i.e. on report footer, header etc.? Also, should not the division be the other way around? something like SUM(IIF(Fields!Month.value=MAX(Fields!Month.value),Fields!Sales.value,0)) / Avg(Fields!Sales.value)
0 Likes 0 ·

·

### Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.