dbTalk Databases Forums  

counting instances of words/parts of words

comp.databases.filemaker comp.databases.filemaker


Discuss counting instances of words/parts of words in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
~consul
 
Posts: n/a

Default counting instances of words/parts of words - 03-04-2010 , 05:33 PM






I am not sure if it's PatternCount or whatever, but I have no clue.
How do I find out how many of xyz do I have?
For example, I'd like the Field:English to count how many records have the text "ENGL" from records with English, ENGL 201, ENGL 100, ENGL 301, ENGL etc so I can display that value.

Then I'll replicate it for Classics, Anthropology, and all the other courses so I can do a semester list tracking the courses through the semesters.

Any suggestions?
--
"... respect, all good works are not done by only good folk. For here, at the end of all things, we shall do what needs to be done."
--till next time, consul -x- <<poetry.dolphins-cove.com>>

Reply With Quote
  #2  
Old   
~consul
 
Posts: n/a

Default Re: counting instances of words/parts of words - 03-04-2010 , 05:35 PM






and thus ~consul inscribed ...
Quote:
I am not sure if it's PatternCount or whatever, but I have no clue.
How do I find out how many of xyz do I have?
For example, I'd like the Field:English to count how many records have
the text "ENGL" from records with English, ENGL 201, ENGL 100, ENGL 301,
ENGL etc so I can display that value.

Then I'll replicate it for Classics, Anthropology, and all the other
courses so I can do a semester list tracking the courses through the
semesters.
Any suggestions?
oops, sorry I am in FMP6.04Unlimited, if it matters.
--
"... respect, all good works are not done by only good folk. For here, at the end of all things, we shall do what needs to be done."
--till next time, consul -x- <<poetry.dolphins-cove.com>>

Reply With Quote
  #3  
Old   
~consul
 
Posts: n/a

Default Re: counting instances of words/parts of words - 03-04-2010 , 06:57 PM



and thus ~consul inscribed ...
Quote:
I am not sure if it's PatternCount or whatever, but I have no clue.
How do I find out how many of xyz do I have?
For example, I'd like the Field:English to count how many records have
the text "ENGL" from records with English, ENGL 201, ENGL 100, ENGL 301,
ENGL etc so I can display that value.
Then I'll replicate it for Classics, Anthropology, and all the other
courses so I can do a semester list tracking the courses through the
semesters.
Whooo Weee! I think I figured it out.

Semester: Text
English: Calc =PatternCount (Course, "ENGL ") returns as Number
Classics: Calc =PatternCount (Course, "CLAS ") returns as Number
Anthropology: Calc =PatternCount (Course, "ANTH ") returns as Number
English_Count: Summary =Total of English
Classics_Count: Summary =Total of Classics
Anthropology_Count: Summary =Total of Anthropology

The layout is:
Header
SubSummary sorted by Semester

When I sort by the Semester, I get the right fields and totals.

Now I just gotta make it for another 30 or so more course catagories, but then it's all automated! And then also figure out how to get the semesters pre-1995, where I have no records, but a hard copy the totals.
--
"... respect, all good works are not done by only good folk. For here, at the end of all things, we shall do what needs to be done."
--till next time, consul -x- <<poetry.dolphins-cove.com>>

Reply With Quote
  #4  
Old   
Your Name
 
Posts: n/a

Default Re: counting instances of words/parts of words - 03-04-2010 , 09:16 PM



In article <hmpktq$itd$1 (AT) gist (DOT) usc.edu>, ~consul
<consul (AT) dolphinsTAKEAWAY-cove (DOT) com> wrote:

Quote:
and thus ~consul inscribed ...
I am not sure if it's PatternCount or whatever, but I have no clue.
How do I find out how many of xyz do I have?
For example, I'd like the Field:English to count how many records have
the text "ENGL" from records with English, ENGL 201, ENGL 100, ENGL 301,
ENGL etc so I can display that value.
Then I'll replicate it for Classics, Anthropology, and all the other
courses so I can do a semester list tracking the courses through the
semesters.

Whooo Weee! I think I figured it out.

Semester: Text
English: Calc =PatternCount (Course, "ENGL ") returns as Number
Classics: Calc =PatternCount (Course, "CLAS ") returns as Number
Anthropology: Calc =PatternCount (Course, "ANTH ") returns as Number
English_Count: Summary =Total of English
Classics_Count: Summary =Total of Classics
Anthropology_Count: Summary =Total of Anthropology

The layout is:
Header
SubSummary sorted by Semester

When I sort by the Semester, I get the right fields and totals.
I've only had a quick look over, but it seems correct to me. )

Statistical analysis / reports in FileMaker is quite cumbersome. It's
often easier to export the data to Excel and do the analysis there.




Quote:
Now I just gotta make it for another 30 or so more course catagories,
but then it's all automated! And then also figure out how to get
the semesters pre-1995, where I have no records, but a hard copy the
totals.
One way, although a bit time consuming, would be to create a record and in
the Course field enter in the appropriate number so "ENGL", "CLAS ", "ANTH
", etc. words. PatternCount will then automatically total them.

It might be better to create a separate record for each year (if you have
the separate totals). Then you can perform Finds on the dates and get the
correct numbers for "the last five years", "the last 10 years", etc. no
matter what "this year" is.


Helpful Harry )

Reply With Quote
  #5  
Old   
~consul
 
Posts: n/a

Default Re: counting instances of words/parts of words - 03-05-2010 , 06:56 PM



and thus Your Name inscribed ...
Quote:
consul (AT) dolphinsTAKEAWAY-cove (DOT) com> wrote:
Whooo Weee! I think I figured it out.
Semester: Text
English: Calc =PatternCount (Course, "ENGL ") returns as Number
The layout is:
Header
SubSummary sorted by Semester
When I sort by the Semester, I get the right fields and totals.
I've only had a quick look over, but it seems correct to me. )
Statistical analysis / reports in FileMaker is quite cumbersome. It's
often easier to export the data to Excel and do the analysis there.
Do you know how to code it so I could have different courses counted into one field? Like have the field English Calc be a PatternCount of ENGL, COLT, WRIT? Or would I have to make separate calc field for each?

I eventually will have to make a total of All Humanities, All Business, All Social Sciences, things like that.
--
"... respect, all good works are not done by only good folk. For here, at the end of all things, we shall do what needs to be done."
--till next time, consul -x- <<poetry.dolphins-cove.com>>

Reply With Quote
  #6  
Old   
Your Name
 
Posts: n/a

Default Re: counting instances of words/parts of words - 03-05-2010 , 07:38 PM



In article <hms970$3vi$1 (AT) gist (DOT) usc.edu>, ~consul
<consul (AT) dolphinsTAKEAWAY-cove (DOT) com> wrote:

Quote:
and thus Your Name inscribed ...
consul (AT) dolphinsTAKEAWAY-cove (DOT) com> wrote:
Whooo Weee! I think I figured it out.
Semester: Text
English: Calc =PatternCount (Course, "ENGL ") returns as Number
The layout is:
Header
SubSummary sorted by Semester
When I sort by the Semester, I get the right fields and totals.

I've only had a quick look over, but it seems correct to me. )
Statistical analysis / reports in FileMaker is quite cumbersome. It's
often easier to export the data to Excel and do the analysis there.

Do you know how to code it so I could have different courses counted
into one field? Like have the field English Calc be a PatternCount of
ENGL, COLT, WRIT? Or would I have to make separate calc field for each?

I eventually will have to make a total of All Humanities, All Business,
All Social Sciences, things like that.
That depends on what totals you want.

If you want separate totals at the same time, then unfortunately you need
separate Calculation fields and separate Summary fields. To combine the
numbers into further groupings tyou then need more Calculation fields and
Summary fields.
e.g.
Num_ENGL Calculation, Number Result, Unstored
= PatternCount(Course, "ENGL ")

Num_COLT Calculation, Number Result, Unstored
= PatternCount(Course, "COLT ")

Num_WRIT Calculation, Number Result, Unstored
= PatternCount(Course, "WRIT ")

Sum_ENGL Summary
Total of Num_ENGL

Sum_COLT Summary
Total of Num_COLT

Sum_WRIT Summary
Total of Num_WRIT

Num_AllEnglish Calculation, Number Result, Unstored
= Num_ENGL + Num_COLT + Num_WRIT

Sum_AllEnglish Summary
Total of Num_AllEnglish

As I said before, statistical anaylsis in FileMaker is painful to set-up
(and later alter), but fine once done.

Sometimes it can be easier to use a separate Table / file and a
relationship to summarise the data - it's a similar process, but it at
least keeps all the clutter out of your main Table, but it depends on how
the database structured and data as to whether or not you can do this.


If you only want the combined totals, then you can alter the Calculation
fields to total all the different English, etc. classes together for each
grouping.
e.g.
Num_AllEnglish Calculation, Number Result, Unstored
= PatternCount(Course, "ENGL ")
+ PatternCount(Course, "COLT ")
+ PatternCount(Course, "WRIT ")

Sum_English Summary
Total of Num_AllEnglish


If you only want individual numbers one at a time, then you can use a
Global field to type / choose the class type, and then have the
PatternCount field use that data.
e.g.

g_ClassType Global, Text

Num_ClassType Calculation, Number Result, Unstored
= PatternCount(Course, g_ClassType)

Sum_ClassType Summary
Total of Num_ClassType

The user can then type / choose a class type in the g_ClassType field, and
then Preview or print a report. You would need multiple Global,
Calculation and Summary fields to get the multiple class groupings for All
English, etc.


Helpful Harry )

Reply With Quote
  #7  
Old   
~consul
 
Posts: n/a

Default Re: counting instances of words/parts of words - 03-10-2010 , 02:27 PM



and thus Your Name inscribed ...
Quote:
If you only want the combined totals, then you can alter the Calculation
fields to total all the different English, etc. classes together for each
grouping.
e.g.
Num_AllEnglish Calculation, Number Result, Unstored
= PatternCount(Course, "ENGL ")
+ PatternCount(Course, "COLT ")
+ PatternCount(Course, "WRIT ")

Sum_English Summary
Total of Num_AllEnglish
This was what I needed! Thanks. I totally forgot about that. I haven't had to think in calcs in many moons.

Right now I am in fmp6, so it is in a separate file, when I migrate to fmp7-10, then it will be a separate table, which will be related to long term archive layouts.

--
"... respect, all good works are not done by only good folk. For here, at the end of all things, we shall do what needs to be done."
--till next time, consul -x- <<poetry.dolphins-cove.com>>

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.