Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Oct 2004
    Location
    Minnesota, USA
    Posts
    151
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calculating a Weighted Average (Access 2003)

    I know how to calculate weighted averages in Excel. However, I've been asked to do it in an Access database and I am at a loss. The help file talks about plain averages.

    Any guidance would be appreciated.

    Thank you!

    Nancy

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Calculating a Weighted Average (Access 2003)

    Say that the weights are in the field named Weights and the values in a field named Values (I'm feeling creative today!).

    You can use the expression
    <code>
    WeightedAverage: Sum([Weights]*[Values])/Sum([Weights])
    </code>
    In a query to calculate the weighted average. If you use it in a totals query, you should set the Total option for this column to Expression.

    If you want to calculate the weighted average directly in a form or report you can place a text box in the form or report footer with this Control Source:
    <code>
    =WeightedAverage: Sum([Weights]*[Values])/Sum([Weights])
    </code>
    It'll also work in a group footer in a report.

  3. #3
    2 Star Lounger
    Join Date
    Oct 2004
    Location
    Minnesota, USA
    Posts
    151
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calculating a Weighted Average (Access 2003)

    Perfect!

    Thank you so much for your fast response.

    Nancy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •