dbTalk Databases Forums  

Help Counting Function

comp.databases.filemaker comp.databases.filemaker


Discuss Help Counting Function in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
squeed2000@yahoo.com
 
Posts: n/a

Default Help Counting Function - 08-10-2005 , 10:20 AM






I am trying to count all calls in a database that have been called.
This calculation is noting when something is called and giving it the
value of "1". But I can't sum them up for all records. I have tried a
self link relationship using the record ID but then everything is
counted even calls not marked as "Called"

Case (Call Status = "Called" ; Count(Call Status) ; Call Status â‰*
"Called" ; " " ; " ")

-S


Reply With Quote
  #2  
Old   
Dan
 
Posts: n/a

Default Re: Help Counting Function - 08-10-2005 , 10:53 AM






You need a self-relationship in which everything is related to
everything. In FMP7 you can do this with the X relation in prior
versions you can relate a field with constant value 1 to itself. Once
you have the relationship set up then SUM(Related::Called) gives you the
number of records with Called = 1 (I'm assuming that otherwise Called is
empty or =0)

squeed2000 (AT) yahoo (DOT) com wrote:
Quote:
I am trying to count all calls in a database that have been called.
This calculation is noting when something is called and giving it the
value of "1". But I can't sum them up for all records. I have tried
a self link relationship using the record ID but then everything is
counted even calls not marked as "Called"

Case (Call Status = "Called" ; Count(Call Status) ; Call Status ?
"Called" ; " " ; " ")

-S
--
Dan
Using
FMP7.03, WinXP SP2




Reply With Quote
  #3  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Help Counting Function - 08-11-2005 , 01:18 AM



In article <1123687205.202520.288910 (AT) g43g2000cwa (DOT) googlegroups.com>,
squeed2000 (AT) yahoo (DOT) com wrote:

Quote:
I am trying to count all calls in a database that have been called.
This calculation is noting when something is called and giving it the
value of "1". But I can't sum them up for all records. I have tried a
self link relationship using the record ID but then everything is
counted even calls not marked as "Called"

Case (Call Status = "Called" ; Count(Call Status) ; Call Status â‰*
"Called" ; " " ; " ")
This looks wrong to me. I can't see why you've got the Count function
in there. Shouldn't it really be:

Case(Call Status = "Called"; 1; 0)

Then your total of "Called" records is a simple matter of using either
a Summary field (Total of above field) or a Calculation field with the
Sum function via a relationship (Sum(Relationship::above field)).


The Count function itself is relatively useless for actually counting
records - it simply counts / includes every record that has ANY data
(including an invisible character like space, Tab, etc.) in the
appropriate field.

This means you could change the above Case statement to be:

Case(Call Status = "Called"; 1; "")

and then a Summary or Calculation field using the Count function and
achieve what you want.

Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


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.