2 Replies Latest reply: May 15, 2014 9:54 AM by DZizzo _ RSS

    Is it possible....

    DZizzo _

      Here's my problem - My file has these fields:

      Class (ex:History 101)  Student (John)  Major of Student (ex:Math)

       

      I want to count the number of students in each major.  My problem is that the file lists each class and every student in it, so students (and their majors) appear multiple times depending on how many classes they are taking.  But I want to count their major only once.  I'm about to give up and tell IT to give me a new file in a different format, but I hate to do that!  Any suggestions would be appreciated.  Thanks!!

        • Is it possible....
          Grant Perkins

          [b]  But I want to count their major only once.  I'm about to give up and tell IT to give me a new file in a different format, but I hate to do that!  Any suggestions would be appreciated.  Thanks!! [/b][/quote]Well, rather than go back to IT it would quicker to run this as a simple 2 stage process using what you have already.

           

          Something along these lines, assuming you can make student ID unique and with only one major possible per student.

           

          Grab the fields and create a simple summary with Major, Student and count (we will ignore count in a minute). Set the "Major" column to suppress display of duplicates if you think it useful. If the numbers are low, and depending on you purpose you could now simply count (or calculate) the number of rows per major.

           

          Alternatively "print" the summary to a file. Then use the new file as a basis for a second model but ignore the count column. That should give you the name of every student for each major just once. Create a summary as before and drill up to the Major level and your count should give you the number you are seeking.

           

          Will that work for you?

           

          Grant

          • Is it possible....
            DZizzo _

            It works!  I have to use the 2-step process, plus since students can have more than 1 major (double majors), I just exported those counts too and appended them to the file.  This was a great chance to play with exporting a summary - something new for me.  That will come in handy too.  Thanks so much for your great great help!!