By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,493 Members | 1,351 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,493 IT Pros & Developers. It's quick & easy.

Finding a percentage for a specific value count

P: 78
This should be simple for someone who knows what they are doing.

I have a report that shows different total type statistics. On the report I need to have a percentage of how may times a specific string occurs in a field.

For Example:

of the recordset 34% of [field] were "string".

How can I do this my thought is something to do with the count function. such as count the total of record count and count the [field] where ="string"
Dec 30 '11 #1

✓ answered by NeoPa

There is no COUNTIF() function available in Access as there is in Excel I'm afraid.

What you can do though, is set a field in your Report query that has a formula similar to :
Expand|Select|Wrap|Line Numbers
  1. =IIf([Field]='String','X',Null)
This field can then be counted in the normal way in your footer.

Share this Question
Share on Google+
2 Replies


NeoPa
Expert Mod 15k+
P: 31,186
There is no COUNTIF() function available in Access as there is in Excel I'm afraid.

What you can do though, is set a field in your Report query that has a formula similar to :
Expand|Select|Wrap|Line Numbers
  1. =IIf([Field]='String','X',Null)
This field can then be counted in the normal way in your footer.
Dec 30 '11 #2

P: 78
Thanks NeoPa! This is a logical approach.
Dec 30 '11 #3

Post your reply

Sign in to post your reply or Sign up for a free account.