R
Rebecca
Here is the SQL for my Crosstab query. All is working fine
except the AVG column appears to show the average before
the rows are grouped instead of after. I want the average
to reflect the average of the summed hours. Anyone know
how to fix this?
PARAMETERS [From-Sunday] DateTime, [To-Saturday] DateTime;
TRANSFORM Sum(qryHrsExtended.hours) AS SumOfhours
SELECT qryHrsExtended.dept, qryHrsExtended.engineer,
qryHrsExtended.category, Avg(qryHrsExtended.hours) AS
AvgOfhours, Sum(qryHrsExtended.hours) AS SumOfhours1
FROM qryHrsExtended
GROUP BY qryHrsExtended.dept, qryHrsExtended.engineer,
qryHrsExtended.category
ORDER BY qryHrsExtended.dept, qryHrsExtended.engineer,
qryHrsExtended.category
PIVOT qryHrsExtended.weekending;
except the AVG column appears to show the average before
the rows are grouped instead of after. I want the average
to reflect the average of the summed hours. Anyone know
how to fix this?
PARAMETERS [From-Sunday] DateTime, [To-Saturday] DateTime;
TRANSFORM Sum(qryHrsExtended.hours) AS SumOfhours
SELECT qryHrsExtended.dept, qryHrsExtended.engineer,
qryHrsExtended.category, Avg(qryHrsExtended.hours) AS
AvgOfhours, Sum(qryHrsExtended.hours) AS SumOfhours1
FROM qryHrsExtended
GROUP BY qryHrsExtended.dept, qryHrsExtended.engineer,
qryHrsExtended.category
ORDER BY qryHrsExtended.dept, qryHrsExtended.engineer,
qryHrsExtended.category
PIVOT qryHrsExtended.weekending;