# Show number of records and also percentage

• ### Question

• Hi,

Back again with another question. I would like to count the number of records in a report and also find the percentage. Example is shown below.

For example the black circle has 10 values and red circle has 1 value with the rest of the column being null.

This will then means that (red/black) * 100 to generate a percentage of the tasks being complete.

Are there any easy way to do this? i've done my research and mostly they ask me to use Count * in a textbox but somehow i could not manage to generate the number of records.

thanks.

Friday, May 25, 2018 6:14 AM

• Use =DCount("*";"tblCourse") for the total.

For the percentage use =DCount("*";"tblCourse";"Not IsNull([Completed])")/DCount("*";"tblCourse"); make sure to format this field as Percentage.

Groeten, Peter http://access.xps350.com/

• Proposed as answer by Tuesday, May 29, 2018 1:35 AM
• Marked as answer by Thursday, June 21, 2018 12:56 AM
Friday, May 25, 2018 8:34 AM

### All replies

• To count the number of records, create a text box in the header or footer of the form or report with control source

=Count(*)

To get the percentage of completed courses, create a text box in the header or footer of the form or report with control source

=Count([Completed])/Count(*)

and set the Format property of this text box to Percent, with 0 decimal places.

Regards, Hans Vogelaar (http://www.eileenslounge.com)

Friday, May 25, 2018 8:21 AM
• Use =DCount("*";"tblCourse") for the total.

For the percentage use =DCount("*";"tblCourse";"Not IsNull([Completed])")/DCount("*";"tblCourse"); make sure to format this field as Percentage.

Groeten, Peter http://access.xps350.com/

• Proposed as answer by Tuesday, May 29, 2018 1:35 AM
• Marked as answer by Thursday, June 21, 2018 12:56 AM
Friday, May 25, 2018 8:34 AM
• Hi syahid,

Do you have any issue with this thread and beow:

#How to integrate excel spreadsheet with access database

If not, I would suggest you mark the helpful reply to close them.

If you do, please feel free to let us know.

Best Regards,

Tao Zhou

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

Wednesday, May 30, 2018 1:49 PM