Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Average of 3 values

Status
Not open for further replies.

flaviooooo

Programmer
Feb 24, 2003
496
FR
Hey,

this seems like an easy task, but I can't see the solution:

I have 3 separate ratings for a player, from 3 different news papers. Now I would like to compile an average rating per player.

I have PlayerID, HBVL_Rating, LDH_Rating, VM_Rating

Beware, sometimes one of the ratings is not filled in...

Any help would be appreciated!
 
I would normalize the table with a union query:
Code:
=== quniRatings ====
SELECT PlayerID, HBVL_Rating as Rating, "BHVL" as NewsPaper
FROM tblNoNameGiven
WHERE HBVL_Rating is not null
UNION ALL
SELECT PlayerID, LDH_Rating, "LDH"
FROM tblNoNameGiven
WHERE LDH_Rating is not null
UNION ALL
SELECT PlayerID, VM_Rating, "VM"
FROM tblNoNameGiven
WHERE VM_Rating is not null;
You can then create a simple totals query that averages [Rating] by PlayerID.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top