calculated field - weighted average

G

Guest

I have worked in Crystal Reports and can create a calculated field that is a
weighted average, but prefer to stay with Access and wondering if I can
created a weighted average calculation.
 
J

John Vinson

I have worked in Crystal Reports and can create a calculated field that is a
weighted average, but prefer to stay with Access and wondering if I can
created a weighted average calculation.

Sure. A Totals query would do this; include a calculated field

WeightedValue: [Value] * [Weight]

in a vacant field cell, and use a Totals query to average this field.

John W. Vinson[MVP]
 
G

Guest

I need to explain more clearly - I have salaries by a group of zip codes in
one field, opopulation by a group of zip codes in another field - I need the
salry total to be weighted by the individual zip code populations that are
grouped into one. This may not be possible in access - and I many not have
explained it well enough - but I can do it in Crystal Reports, but would
rather not. If anyone knows Crystal Reports and Access, I would love to
communicate on what one does over the other.
--
HYoder


John Vinson said:
I have worked in Crystal Reports and can create a calculated field that is a
weighted average, but prefer to stay with Access and wondering if I can
created a weighted average calculation.

Sure. A Totals query would do this; include a calculated field

WeightedValue: [Value] * [Weight]

in a vacant field cell, and use a Totals query to average this field.

John W. Vinson[MVP]
 
J

John Vinson

I need to explain more clearly - I have salaries by a group of zip codes in
one field, opopulation by a group of zip codes in another field - I need the
salry total to be weighted by the individual zip code populations that are
grouped into one. This may not be possible in access - and I many not have
explained it well enough - but I can do it in Crystal Reports, but would
rather not. If anyone knows Crystal Reports and Access, I would love to
communicate on what one does over the other.

It's quite straightforward, actually, if I understand correctly. You
just need a Query joining your salary table joined to the population
table by zipcode; use the Salary as the "value" in my example, and the
population as the "weight".


John W. Vinson[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

Top