Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / January 2005

Tip: Looking for answers? Try searching our database.

report statistics

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
nevpoe - 30 Jan 2005 09:35 GMT
I am trying to report some percentages on my report and am unsure how to set
it up.  I need to report what percentage was between a specific range, what
was below that range, and what was above that range.  I tried a query but you
cant run these all at once.  Thanks for the help.
John Nurick - 30 Jan 2005 10:27 GMT
You can do it all at once in a query, though it's beyond what can
conveniently be done with the query designer. Here's an example:

SELECT
  SUM(IIF([XXX]<400,1,0))*100/Count([XXX]) AS PercentUnder400,
  SUM(IIF([XXX]>=400 AND [XXX]<500,1,0))*100/Count([XXX]) AS Percent
400To500,
  SUM(IIF([XXX]>=500 ,1,0))*100/Count([XXX]) AS PercentOver500
FROM tblMain;

If you want to display the percentages in textboxes in the report footer
(a typical way of doing it) you could instead use expressions like this:

    =DCount("[XXX]","tblMain","[XXX]>=400 AND [XXX]<500") * 1000 /
DCount("*","tblMain")

>I am trying to report some percentages on my report and am unsure how to set
>it up.  I need to report what percentage was between a specific range, what
>was below that range, and what was above that range.  I tried a query but you
>cant run these all at once.  Thanks for the help.

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
nevpoe - 31 Jan 2005 07:17 GMT
Thanks, I will give it a try.

> You can do it all at once in a query, though it's beyond what can
> conveniently be done with the query designer. Here's an example:
[quoted text clipped - 21 lines]
>
> Please respond in the newgroup and not by email.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.