Pivot Grades and GPA calculation - Analysis Services -
09-15-2004
, 02:34 PM
I do not know how to construct a calculated member in this situation.
I have built a courses cube using the analysis manager that has grade
dimension and I'd like to create a grade point average calculation. The base
cells contain College, Department, course, Session, hours and grade. Grades
can be "A", "B", "C", "CT". The "CT" does not calculate into grade point
average. In calculating GPA; A=4, B=3, C=2, CT=0. Gradepoints are
grade*hours; GPA is gradepoints/hours. I'd like to see
_Grade_
_College_ _A_ _ B_ _C_ _CT_ _Total_
One 4.0 3.0 2.0 3.48
Two 4.0 3.0 2.0 3.25
I want to be able to say something like
GPA=sum(iif(grade="A",hours*4,iif(grade="B",hours* 3, ... ,
0))))/sum(iif(grade="A",hours,iif(grade="B",hours, ... , 0)))) but I don't
know how to tell the cube editor to look at the column heading!
I can include the fields in the data, but I'd rather learn how to calculate
it on the fly, since I have similar situations in other applications.
TIA, Bill. |