Percentage of total

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How would I add another field to this query to calculate the percentage of
each doctype out of total docs?

TIA

SELECT qryPOExtended.DocType, tblDocType.Description,
DocCount(qryPOExtended.DocType) AS CountOfDocType
FROM tblDocType INNER JOIN qryPOExtended ON tblDocType.DocType =
qryPOExtended.DocType
WHERE (((qryPOExtended.PurGroupArea)="OPS Buying") AND
((qryPOExtended.Month) Between [Month From] And [Month To]))
GROUP BY qryPOExtended.DocType, tblDocType.Description;
 
Hi,


Can't you divide by DCount( ... ) or by (SELECT COUNT(*) FROM ... )
.. DCount will only work with Access+Jet.


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top