Jump to content

Calculating # of Value List Instances

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

Recommended Posts

Hello there, i'm requiring your help yet again.

I have a database of 313 graduates that lists their current area of employment via a value list

i.e. archival, a/v tech, multimedia etc.

I would like to have a layout that calculates and tells me how many of my graduates are in each field.

i.e. Archival - 1, A/V Tech - 8, Multimedia - 16

I thought that it would need to be done by some sort of if loop, but i'm unsure how to go about implementing that.

Your advice is greatly appreciated!

Link to comment
Share on other sites

Actually I am a but confused, how is it I would use the count function?

I'm unfamiliar with it, sorry.

If my database is called School, and the field I would like to count is called Employment, and the list item from the Employment field I would like to count is "Archival" how would I do that, something like:

Count(Employment::Archival) ?

Link to comment
Share on other sites

The Count() function only checks if the field has a valid, non-blank value. ANY value. To count SPECIFIC values within a field, you need to break them out into separate fields.

If you have many possible values, you can use a repeating field for the break out, then use a summary field to count (actually, sum) the repetitions individually. See the demo I have posted in this thread.

Link to comment
Share on other sites

no it would be

count( school:employment)

In your portal, lets call it talley, with a field called employment. Then talley:employment would be related back to school:employment. Talley:employment would have the career types you wished to count. I am assuming the categories would be limited to at the most 10.But if that is not the case, the way you could insure that you had all the different employment types in talley:employment would be to make it unique, then import the school:employment field into Talley. There would be only one listing for each category of employment. This is basically what I did with the zipcode example. I hope this is understandable. I have some more example files which might make this a little clearer.

Link to comment
Share on other sites

Ooops. Sorry, haven't noticed your version. I have never used 6 so I don't know it will work. Probably not (check in Define fields, when you define a summary field of type Total, if you have the option to summarize repetitions individually).

If not, you have two options:

1. Create a calculation field for each category, that will return 1 if the record belongs to that category. Then a summary field for each category (Total of calculation field).

That's a lot of fields, so you'd probably would be better off following albud's suggestion, which in a nutshell is:

2. Create another file, Categories, where each record is a category. Define a relationship from Categories to your School file, so that

Categories::Category = School::Employment

In the Categories file define a calculation field =

Count ( School::PersonID )

This will return the number of graduates in that category.

Link to comment
Share on other sites

Take a look at the file I posted here

http://fmforums.com/forum/showtopic.php?fid/31/tid/164109/pid/174268/post/last/#LAST, example.zip. It was written in fmp4.0 so you should be able to follow it. The reason why I checked for dups was to avoid totaling given zipcode more than once.

Link to comment
Share on other sites

I apologize for being so unbelievably daft, but I still have not figured out how to do this, even with all of your examples...

..I'm sure I am just overlooking on small piece of information.

I have now upgraded to FileMaker 7 (and I can't even find the define fields command...!)

Link to comment
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.