query expression

M

macamarr

Hello,
Thanks for taking the time to look!

First off,I am terrible at expression. Anyway I set up a
db where I enter NFL teams through a form to my table
according to the weeks schedule. I also input the Saragin
Table values to determine the potential outcome of the
game. What I am trying to accomplish in my query is how
accurate the saragin table is to the actual outcome of the
games. My query is set up to show the following:
HomeTeam
HomeTeamRank(SaraginTableValue)
HomeTeamScore(SaraginTableValue add on points)
HTwin(checkbox for post game results)
VisitorTeam
VisitorTeamRank(SaraginTableValue)
VisitorTeamScore(SaraginTableValue does not give points to
the visiting team)
VTwin(checkbox for post game results)

I know what I want to calculate, but I do not know how to
ask the query. I want the query to see who was favored
(teamscore) against the checkbox for post games results
(win) and give me an avg of the correct perdictions.

If you can help great, if not thanks for taking the time
to look.
 
S

Steve Schapel

macamarr,

Possibly easiest to do this in 2 steps. First step is to make a query
based on the table you have described, and put the following
calculated field expression in the Field row of a blank column in the
query design grid...
PredictionCorrect: [HomeTeamRank]<[VisitorTeamRank] And [HTWin]

Then make a new query based on this first query, and in the Field row
of the query design grid type...
Abs(Sum([PredictionCorrect]))/Count([PredictionCorrect])*100

If I understand your requirements correctly, this will return the
percentage of games where the prediction was correct.

- Steve Schapel, Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top