Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Distinct Subtotals in a Matrix

Status
Not open for further replies.

tpsmith

Technical User
Jan 5, 2005
25
0
0
GB
Hi

I am trying to add together the subtotals for a matrix but in the dataset the value appears for each line and I need to be able to drill down into the detail of the report so cannot just summarise in the query .... i hope this makes sense, I struggle to explain whats needed so here is a simple breakdown.

Department Course Target Student Code
ART ABC 12 AS1234
ART ABC 12 AS3455
ART ABC 12 AS3453
ART ABC 12 AS4567
ART ABC 12 AS4242
ART DEF 6 AS2223
ART DEF 6 AS1111
ART DEF 6 AS4444

I need to be able to group by the department and give the total of 18 for the department total so not summing the target field on the report. I can group by the department and the course and display the target for each course but when I go to sum the target for the department i get the value for each student not the coure.

Please help!! :)

Thank you
Tony


 
I'd be handling this in the query - simply divide the target by count of course - then it is a simple sum. You can do this in the report as well but generallyI try to do these kind of things in the query

Alternatively you can use ROWNUMBER in your query and only populate the target where ROWNUMBER = 1

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Thank Geoff, rownumber may be the way forward as I have detailed data in the query and not summarised.

Regards
Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top