1 Reply Latest reply on Jun 19, 2012 7:34 AM by philmodjunk

# Calculation based on 2 fields

### Title

Calculation based on 2 fields

### Post

I am working on a database to track statitistics during college bowling tournaments.

I cannot figure out a way to track total records based on values in 2 fields.

For example,

Total single pin spares - I have fields for to pins knocked down on the first ball and a field to indicate that a spare was made.

How do I count the records where first ball count = 9 and mark = y ?

The statistics are being stored in a seperate table in the same database. I can get totals for records where I only need to look at a single field (like total strikes).

Thanks

• ###### 1. Re: Calculation based on 2 fields

I am assuming that you have a separate record for each bowling frame.

Enter find mode

Specify 9 in first ball field, "y" in mark field or

> 9 and y if you want records where first ball count is 9 or larger.

Perform your find and the number of records will be the count you specified.

The same counts can be computed using a relationship or a filtered portal with a summary field.

And in all of these cases, I wouldn't be suprised if you needed to specify additional criteria such as a specific player, game or team (or any combination of them.)

Here's a relationship based example:

Stats::gFirstBall < Frames::FirstBall AND
Stats::gSpareFlag = Frames::SpareFlag

Where gFirstBall and gSpareFlag are global fields where you would enter 9 and Y to get the stats you've specified if you used an expression such as: Count ( Frames::FirstBall ) or referred to a "count of" summary field in Frames.

Note: You could use calculation fields set to specific constants in place of these global fields, but with global fields, you can get different counts just by entering different values into the global fields.