2 Replies Latest reply on Dec 3, 2012 2:55 PM by productionQC

    Frequency Calculation for Graph



      Frequency Calculation for Graph



           Hello All-

           I have a database that contains all of our products.  We test each of our products multiple times all year long.  I have the database setup to record SAMPLES taken from PRODUCTS. Thus I have two tables, PRODUCTS and SAMPLES.  What I need to accomplish is to chart a Distribution Curve based on each product and its results.  So far I have been trying to figure out a way to calculate the FREQUENCY in the database, much the same as the FREQUENCY command in Excel.  I can't seem to find a similar function.  Is there another way?  What I would like to know is the FREQUENCY in which particular test result appears for each product.  For example:  We test a sample which provides a strength number.  If product "A" has 300 samples in the last year, then we have 300 strengths.  Therefore, we need to know how many times for Product "A" that the strength was 15 and 14 and 10 and and and...to form a frequency.

           We then need to repeat this for Product "B" and so on...  Thus, for every product we can produce a distribution chart using our mean and standard deviation.  


           Are we going about this the right way, or is there and easier way to produce this chart/graph


           Thank you.


        • 1. Re: Frequency Calculation for Graph

               Define a "count of" summary field in Samples and select a field that is never empty as the field to "count". (a primary key field makes an excellent field to use for this count.)

               Find all records for Product "A".

               Sort your records by the value in the Strength field. If it's a floating point value where "15", "14", "10" actually represent ranges of values such as 14.5 to 15.4 for a strenght of "15" define a calculation field for this sort that rounds to the lesser number of decimal points to produe a common value for each group of records representing a specific "frequency" point in your chart.

               Now you can chart the summary field and specify the "found set, grouped values when sorted" data source option for your chart.

               If you have never created summary reports with sub summary layout parts, ignore the rest of this post.

               If you have, it may help to picture each point on your chart as a sub summary layout part. Just like such layout parts, the current found set of records must be sorted by the "Strength" field to group records and get a count of those records for each group.

          • 2. Re: Frequency Calculation for Graph

                 Ok thanks!  I am going to give this a try and report back.  

                 Are you the VP of FM.  You have all the answers my friend, for everyone, thank you so much!