# How many records contain exact data in the same field

This topic is 5714 days old. Please don't post here. Open a new topic instead.

## Recommended Posts

Hi everyone! -)

I'm looking for a calculation field that yields a number. The number would tell how many records contain exact data in a certain field.

Example: There are 10 records in an "Address Book" database. There is only one table in this database. This is the contents of the "FirstName" field of each record:

The first name Bob occurs 3 times.

The first name John occurs 4 times.

The first name Sally occurs 2 times.

The first name Martha occurs 1 time.

When someone is flipping through the records and they come to a record with the first name of Bob - the calculation field would show the number 3.

When someone is flipping through the records and they come to a record with the first name of John - the calculation field would show the number 4.

When someone is flipping through the records and they come to a record with the first name of Sally - the calculation field would show the number 2.

When someone is flipping through the records and they come to a record with the first name of Martha - the calculation field would show the number 1.

Thanks, kcep

##### Share on other sites

Use a Portal based on a Relationship based on the First Name field.

Lee

##### Share on other sites

Lee thanks for pointing me in the right direction! -)

I'm getting closer, but I'm still lost on my final step.

Could you take a quick look at the attached database and see how I'm doing. I still don't know how to get the final number.

Thanks! kcep

##### Share on other sites

See if this is what you want

##### Share on other sites

Hi Lee !

Getting closer ;-)

I need the calculated answer to work if the records are sorted or not sorted. Right now the calculation only works if it is sorted. The reason I need it like this is because this calculated answer will be used in another calculation later on.

Also, I've changed the way that I'm presenting my problem. (see new attached database) I'm not sure this will make a difference in the way this problem is addressed, but I'm actually working with numbers and not text in the "Name" field. - Just thought I should say that in case it matters.

Thanks a bunch! You're brilliant!

kcep

##### Share on other sites

Just use a calculation of Count(relationship::Serial_ID). Whether the records are sorted or not will have no effect.

##### Share on other sites

THANK YOU SO MUCH

You're Great

kcep

##### Share on other sites

This topic is 5714 days old. Please don't post here. Open a new topic instead.

## Create an account

Register a new account