Monday, March 12, 2012

Matrix help

Hi all. Trying something that seems like it shoulb be simple.
Important Data:
StudentID (ex. 1, 2, 3)
Class (ex. Math, English)
Response (-10 to 10)
Here is what I'm trying to get
Student 1 Student 2 Average
Math -7 3 -2
English -1 9 4
Science 10 4 7
================================================== (sum) 2 16 9
So, here is where I am now. I've added two rows to the matrix,
one that is aggregated by MAX (or FIRST or whatever, since I
know I'll only get one StudenID per class), and one that is AVG.
That way, I can get a row that has AVG, and a column that has sum.
Is this possible? Thanks.Yes, you can use this expression in the matrix cell:
==IIF(InScope(<ClassGroupName>) And InScope(<StudentIDGroupName>),
Max(Fields!Response.Value), IIF(InScope(<ClassGroupName>),
Avg(Fields!Response.Value), Sum(Fields!Response.Value)))
Fang Wang (MSFT)
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Will" <groups@.willwyatt.com> wrote in message
news:28d5f694.0407181851.2376aecf@.posting.google.com...
> Hi all. Trying something that seems like it shoulb be simple.
> Important Data:
> StudentID (ex. 1, 2, 3)
> Class (ex. Math, English)
> Response (-10 to 10)
> Here is what I'm trying to get
> Student 1 Student 2 Average
> Math -7 3 -2
> English -1 9 4
> Science 10 4 7
> ==================================================> (sum) 2 16 9
>
> So, here is where I am now. I've added two rows to the matrix,
> one that is aggregated by MAX (or FIRST or whatever, since I
> know I'll only get one StudenID per class), and one that is AVG.
> That way, I can get a row that has AVG, and a column that has sum.
> Is this possible? Thanks.

No comments:

Post a Comment