in access how can i average many fields in each one record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to sum, avg a number of fields in the some record, for ex. I have
records with fields like: Name, Jan, Fev, March.... which are the name and
how much did somebody spent on jan, fev... and i'd like to know: the sum of
it and the mensal avg.
 
First, you should not have fields named Jan, Feb, Mar, etc. Your table is
not normalized.
 
Yes it is. Imagine a class with people with name and several subjects to
study, so
their grade list are:
Name; Math; History; Ciences... Final Average
Ines, 10, 8; 15;..., 11
Rick, 15, 10, 12,...12.1
and so on...
How can I get the final average?
 
Ines said:
Yes it is. Imagine a class with people with name and several subjects
to study, so
their grade list are:
Name; Math; History; Ciences... Final Average
Ines, 10, 8; 15;..., 11
Rick, 15, 10, 12,...12.1
and so on...
How can I get the final average?

You would have instead a table like...

Name ClassName Grade
Rick Math 10
Rick Science 9
Rick English 5 (always hated english)
John Math 8

....Then a crosstab query can easily give you a presentation that is arranged
like your table except the average is easily computed from ROWS instead of
awkwardly from COLUMNS.
 
The PROBLEM is:
I already have that table (imported from another aplication) how can i
rearange it?
 
ines said:
The PROBLEM is:
I already have that table (imported from another aplication) how can i
rearange it?

Either by using a large UNION query to rearrange to a more normalized format
or just do the averaging yourself in a query...

Name Math Science English Avg: ([Math] + [Science] +
[English])/3
Rick 10 8 5 7.667

If you have a lot of class columns then your average expression will just
have to include all of the columns (and divide by that number of columns).
 
thanks, i'm going to study how to do a UNION and how to work with
crosstables, thank you any way

Rick Brandt said:
ines said:
The PROBLEM is:
I already have that table (imported from another aplication) how can i
rearange it?

Either by using a large UNION query to rearrange to a more normalized format
or just do the averaging yourself in a query...

Name Math Science English Avg: ([Math] + [Science] +
[English])/3
Rick 10 8 5 7.667

If you have a lot of class columns then your average expression will just
have to include all of the columns (and divide by that number of columns).
 
Back
Top