Need Query showing percentages instead of sum or count

Shinken

Registered User.
Local time
Today, 01:14
Joined
Oct 5, 2002
Messages
14
WHAT I HAVE:

I have a crosstab query setting up a year-to-date grid.

There are 6 rows (grouping table by 6 allowable string entries), and 14 columns. The columns in the query are Description, total of each description, and then Jan, Feb, Mar, etc. The result is a query I can put into a report showing YTD info total and by month.

Example:

............Jan...Feb...Mar...Apr....Total
MPR.......1.......3.......1......0........29
FPR........3.......4.......0......3........23
FPO........9.......1......3.......4.......32

WHAT I NEED TO DO:

I need to create a query that displays a percent of a description, such as the following which would be a percent MPR/count for each month, and for the total:

............Jan...Feb...Mar...Apr............Total2002
%MPR......8.....13.....25.....19.5........11.3

The original crosstab query is as follows:

TRANSFORM Count(qryIntakeForm.IntakeNumber) AS CountOfIntakeNumber
SELECT qryIntakeForm.SupervisionType, Count qryIntakeForm.IntakeNumber) AS [Total Of IntakeNumber]
FROM qryIntakeForm
WHERE (((qryIntakeForm.IntakeDate) Between [StartDate] And [EndDate]))
GROUP BY qryIntakeForm.SupervisionType
PIVOT Format([IntakeDate],"mmm") In ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");

A similar crosstab query with percentages of the total rather than counts, would be preferable. However, a select query based on the above query would also work.

Thanks much,

Shin
 

Users who are viewing this thread

Back
Top Bottom