September 2, 200421 yr Newbies I am putting together a simple database for my school to use to keep football stats. Is there any way to take a field (for instance - GainLoss of Yds - and get a sum total of that field for all records? I can set the functions to do sums based on a condition, but I simply want the total for all records that have a value in that field.
September 2, 200421 yr If you create a summary field for fieldA, it will give you this total based on the current found set. If you want the total for all records, regardless of the found set, you'll need to create a relationship based on a constant calculation or auto-enter field of 1. Then create a calculation field of Sum(constantrelationship::fieldA). If you are using version 7, a Cartesian join (using the X operator) relationship between any two data fields will give you the same result as a constant-to-constant one in previous versions.
September 2, 200421 yr Author Newbies Thank you. It worked perfectly. I do have another quick questions, though. If you have a value in a field that you want to take a sum for, can you do so using multiple conditional statements? For instance, every play made in the game stores the players number, the gain or loss in yardage, and the nature of the play (pass or run). Is there an easy way to sum up an individual player's running yards, etc? Is this a good spot for a case statement? Thank you again for all of your help! David
September 2, 200421 yr Create a relationship based on the player's id. Then create a calculation of Sum(relationship::field) for as many fields as you need to summarize.
Create an account or sign in to comment