summary of crosstab

hi guys:
i am trying to create crosstable, the data i get from database is like this:


YEAR         Department       PATHWAY_NAME                   CP   MARKS
2008	        aaa	           Secondary Education	        6	75
2008	        aaa	           Secondary Education	        6	73
2008	        aaa	           Secondary Education           6	74
2007	        aaa	           Higher Education Course       8	83
2007	        aaa	           Higher Education Course       8	80
2009	        bbb	           Higher Education Course       6	89
2009	        bbb	           Secondary Education	        6	77
2009	        bbb	           Secondary Education	        6	71

I grouped department,
the crosstab looks like:

Department name: aaa
                                                     YEAR
                                        2007              2008             2009
Secondary Education                    <summary> 
Higher Education Course
Secondary Education
should display: sum(MARKS * CP)/sum(CP)

and i have no idea to make it happened because sum function somehow doesn’t work in the summary. and i canot use running total due to there no group on the PATHWAY_NAME .

anyone can help me to figure it out? I am sure there is a way :frowning:

thanks so much.


abyss :australia: (BOB member since 2009-12-17)