0

How do you Count the number of records within a database from a specific field?

How can I count the number of specific records in a field?  

 

For example:

I have 1000 records

Each of those 1000 records has a field with a number.    They range from 1 to whatever and may or may not have multiples of the same number.  Let's pick the number 80.

Within the 1000 records, the number 80 (in that specific field) shows up 53 times.

 

When I'm on that specific record (that has the number 80...or what ever number is associated with that record), I would like to see how many times the number 80 shows up within the 1000 records.  In this case, it should show "53"

6 replies

null
    • SMoore
    • 5 yrs ago
    • Reported - view

    I too would like to find out if this is possible

    • Nick
    • 5 yrs ago
    • Reported - view

    Hi,

    try this

     

    cnt(select TableName where FieldName like "80")

     

    Nick

    • Nick
    • 5 yrs ago
    • Reported - view

    ...or

     

    let myNum := FieldName;
    cnt(select TableName where myNum = FieldName)

     

    Nick

    • danlap333
    • 5 yrs ago
    • Reported - view

    Worked Perfectly.  Thank you!

    • ccarrieta
    • 5 yrs ago
    • Reported - view

    I have a similar question.. If I want to restrict the search to a certain date range how would the forumla change ?

    • Birger_H
    • 5 yrs ago
    • Reported - view

    –––
    let myLow := 'Field for lower Range';
    let myUp := 'Field for upper Range';
    cnt(select TableName where (myLow <= FieldName and myUp >= FirldName))
    –––

    Birer

Content aside

  • 5 yrs agoLast active
  • 6Replies
  • 2829Views