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 / Reports / Printing / March 2008

Tip: Looking for answers? Try searching our database.

Calculate percentage for each group

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Beetle - 29 Mar 2008 21:53 GMT
I'm working on a report that has two groups. In the detail section for
each group I would like to show the percent of the group and the
percent of the total, so the result would look something like;

Group 1    Deliveries    Pickups    Total    % of Group    % of Total
  A                5               3            8            50%            
  32%
  B                2               3            5            31%            
  20%
  C                1               2            3            18%            
  12%

Group Totals:  8              8            16

Group 2    Deliveries    Pickups    Total    % of Group    % of Total
  D                3               2            5            56%            
 20%
  E                1               0            1            11%            
  4%
  F                0               3            3            33%            
 12%

Group Totals: 4               5            9

Grand Totals: 12             13          25

I'm having trouble getting the group percentage to work. If I use
=([txtTotal]/[txtGroupTotal]) in an unbound text box I get a parameter
popup because there in more than one group total. I've tried a few
other methods with hidden controls, etc. but can't get anything to
work. Any Ideas?

TIA
Signature

_________

Sean Bailey

Marshall Barton - 30 Mar 2008 01:32 GMT
>I'm working on a report that has two groups. In the detail section for
>each group I would like to show the percent of the group and the
[quoted text clipped - 27 lines]
>other methods with hidden controls, etc. but can't get anything to
>work. Any Ideas?

When you want to use a group total value in a detail
calculation, put a (hidden?) text box for the group total in
the group **header** section.  Then use that text box's name
in the calculation.

For example, the % of Total column text box would use an
expression like:
    =txtTotal / txtGroupHdrTotal

Signature

Marsh
MVP [MS Access]

Beetle - 30 Mar 2008 02:30 GMT
Thanks Marsh. I tried that in the footer, but not in the header. I didn't
realize that made a difference. Appreciate the help.
Signature

_________

Sean Bailey

 
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.