Link to home
Start Free TrialLog in
Avatar of joylene6
joylene6Flag for United States of America

asked on

MS ACESSS calculation of percentage question in report

I have an MS ACCESS report.   in the detail section I count the number of objects  for each day, then have a percentage calculated.

In the footer, I SUM the counts for a grand total  of the selected dates.   My problem is, I dont know how to write the grand total percentage.

In the detail section, I write my percentage calculation like this and it works:  =[CountOfChartedStatus2]/[CountOfTOTAL1]

In the footer, these are the two fields I need to make a percentage of:    =Sum([CountOfChartedStatus2])   and   =Sum([CountOfTOTAL1])

How should I write this to get a percentage.   Thanks.
Avatar of PatHartman
PatHartman
Flag of United States of America image

=Sum([CountOfChartedStatus2])   / =Sum([CountOfTOTAL1])

This assumes the summed fields are in the Recordsource.  You CANNOT sum control values.  Calculations that reference control names work ONLY when the controls are in the same section as the calculation so that Access has them available at the current time.   If those are the names of controls, change them to be the names of the actual table fields.
Avatar of joylene6

ASKER

That was the first thing I tried.   If it was to work, I think need to write it a different way.    I am using the actual table name fields.
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for fixing my typo again.  Maybe I need new glasses.
Thank you so much. That worked!!
You are both welcome!

/gustav