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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two aggregate functions in two rows in matrix

Status
Not open for further replies.

dhv919401

Programmer
Apr 26, 2004
34
CA
I have the following:


Month Subtotal
District year quarter Days Sum(Days)
Crewsize First(Cresize)


Example:

1 2 3 Subtotal
GP 2007 FirstQuarter Days 101 110 98 309
CrewSize 5.3 6.6 7.7 5.3

MH 2007 FirstQuarter Days 120 154 47 321
CrewSize 6.3 7.6 5.8 6.3



I have to get a subtotal of Days as SUM(Days)
and subtotal of CrewSize as AVG(CrewSize).

I am getting the subtotal of days properly.
But as I cannot give another field as Average for crewsize, it is taking the first value in the Cresize always.

Is there any way of calculating a different aggregate for the second row values? (I mean average for Cresize?)

I appreciate any help in this regard,
Thank you for your time,



 
I am eargerly waiting for any clue. Any thoughts from anybody please?
Thank you,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top