2 Replies Latest reply on Jan 26, 2009 5:00 AM by Jaimate

    Counting a values of certain Field

    Jaimate

      Title

      Counting a values of certain Field

      Post

      I'm trying to count the number of applications that have "UCLA" in the University field.

       

      I've tried creating a counter with an if function and do a summary of it, but it doesn't work: the summary keeps increasing everytime a go trough a true value.

       

      Thanks a million

        • 1. Re: Counting a values of certain Field
          Sorbsbuster
            

          Hi, Jaimate and welcome to the forum.

           

          Here's an easy way that's also very flexible ('cos I just *know* that next time you'll want to count 'Yale'...):

           

          1. Create a field 'UniversityToCount_g'.  Make it type 'Text', and Storage Option to be 'global'. (I assume you are checking for 'UCLA' in a field called 'UniversityAppliedTo'.)

           

          2. Create a calculation field, 'UniversityCounter'. Make its result a Number:

           

          Case (

          PatternCount ( UniversityAppliedTo ; UniversityToCount_g )  ; 1 ;

          0

          )

           

          3. Create a 3rd field, SumUniversityCounter, as a summary field, (sum) of UniversityCounter.

           

          Put the  'UniversityToCount_g' field somewhere handy, such as a Preferences layout, where the Administrator (you) can set it to be "UCLA".

           

          Now put the SumUniversityCounter in the header, footer, sub-summary, or grand summary sections (depending upon when you want to see a break in the count) and it will add up the number of applications for UCLA for you.  Then just change it to 'Yale', and it will do that instead.

           

          Never sure how much people know, so if anything isn't obvious to you, just say.

           

          HTH,

          Alan

          • 2. Re: Counting a values of certain Field
            Jaimate
               Thanks a million. It was all quite clear.