Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Finding the average in a table

Discussion in 'Information Technology' started by Nada, Oct 29, 2005.

  1. Nada

    Nada
    Expand Collapse
    Guest

    Hi,
    I am a novice to Access.
    In a query or form, I want to show instantly the average of the marks
    entered. Is it possible?
    Thanks
    Nada
     
  2. Loading...

    Similar Threads Forum Date
    The Salmon Story, Finding Home Sikh Sikhi Sikhism Jul 29, 2016
    Sikhi Guru Nanak's Methodology Of Finding Truth Sikh Sikhi Sikhism Jan 1, 2016
    Movies Ashdoc's movie review---Finding Fanny ( English version ) Theatre, Movies & Cinema Sep 15, 2014
    S Asia Sikh Girls in Afghanistan Face Difficulty in Finding Mr. Right Breaking News Jul 31, 2013
    Finding True Guru Gurmat Vichaar Jan 7, 2012

  3. Steve Schapel

    Steve Schapel
    Expand Collapse
    Guest

    Nada,

    Yes, it is possible, via both a query and a form. In both cases, you
    would use the Avg() function. Assuming the field where you are entering
    the marks is named Marks, in design view of a query you would make a
    calculated field in the Field row of the query design grid, something
    like this...
    AverageMark: Avg([Marks])
    If you needed to get the average marks per person, or per week, or
    whatever, then you would do this within a Totals Query, as applicable.

    In a form, assuming a continuous view form, you would put an unbound
    textbox in the Form Footer section, and in the Control Source property
    of the textbox, enter the equivalent of...
    =Avg([Marks])

    --
    Steve Schapel, Microsoft Access MVP

    Nada wrote:
    > Hi,
    > I am a novice to Access.
    > In a query or form, I want to show instantly the average of the marks
    > entered. Is it possible?
    > Thanks
    > Nada
     
  4. Allan Murphy

    Allan Murphy
    Expand Collapse
    Guest

    Use the AVG function in your query as an example
    In your query add the following column avg_marks:avg(marks) where marks is
    the marks entered

    --
    Allan Murphy
    Email: allanmurphy@unwired.com.au
    "Nada" <Nada@discussions.microsoft.com> wrote in message
    news:FF0AC5FA-6B1F-44B5-B1E7-4498F887303C@microsoft.com...
    > Hi,
    > I am a novice to Access.
    > In a query or form, I want to show instantly the average of the marks
    > entered. Is it possible?
    > Thanks
    > Nada
     
  5. Joseph Meehan

    Joseph Meehan
    Expand Collapse
    Guest

    Nada wrote:
    > Hi,
    > I am a novice to Access.
    > In a query or form, I want to show instantly the average of the marks
    > entered. Is it possible?
    > Thanks
    > Nada


    To add to the good answers you already received, I will add the unstated
    issue. Tables are just tubs to store data in, but are not good for viewing,
    editing or working with the data. Queries, forms and reports are the places
    where you want to work with the data.

    --
    Joseph Meehan

    Dia duit
     
  6. Jeff Boyce

    Jeff Boyce
    Expand Collapse
    Guest

    And I'll add one more chime-in...

    If you have designed a well-normalized data structure, the AVG() function
    (or DAVG(), depending on where you are doing this) will return the average
    of a COLUMN of values.

    If your data structure is more like a spreadsheet, using one column/cell per
    value, Access does not have a function that sums, averages, etc. ACROSS
    columns.

    Is your data a "spreadsheet"?

    --
    Regards

    Jeff Boyce
    <Office/Access MVP>

    "Nada" <Nada@discussions.microsoft.com> wrote in message
    news:FF0AC5FA-6B1F-44B5-B1E7-4498F887303C@microsoft.com...
    > Hi,
    > I am a novice to Access.
    > In a query or form, I want to show instantly the average of the marks
    > entered. Is it possible?
    > Thanks
    > Nada
     
  7. Nada

    Nada
    Expand Collapse
    Guest

    Thanks Allan and Steve for yor suggestion.
    My problem is that I actually have a table with grades for every student on
    different topics, so I am not finding the average of a one column, but part
    of a row for every student.

    "Allan Murphy" wrote:

    > Use the AVG function in your query as an example
    > In your query add the following column avg_marks:avg(marks) where marks is
    > the marks entered
    >
    > --
    > Allan Murphy
    > Email: allanmurphy@unwired.com.au
    > "Nada" <Nada@discussions.microsoft.com> wrote in message
    > news:FF0AC5FA-6B1F-44B5-B1E7-4498F887303C@microsoft.com...
    > > Hi,
    > > I am a novice to Access.
    > > In a query or form, I want to show instantly the average of the marks
    > > entered. Is it possible?
    > > Thanks
    > > Nada

    >
    >
    >
     
  8. Allan Murphy

    Allan Murphy
    Expand Collapse
    Guest

    Nada

    Add another column and depending on how many subjects do the following

    Student_avg:([subject1]+[subject2] .... [subjectx])/no of subjects

    What the above does for each student is add all the subject marks then
    divide the total marks by the total number of subjects

    If the students do not do all the same subjects then a bit of coding will be
    required.

    --
    Allan
    Email: allanmurphy@unwired.com.au
    "Nada" <Nada@discussions.microsoft.com> wrote in message
    news:F989A0EF-56D8-4703-8FE6-4FE4B9613EBB@microsoft.com...
    > Thanks Allan and Steve for yor suggestion.
    > My problem is that I actually have a table with grades for every student

    on
    > different topics, so I am not finding the average of a one column, but

    part
    > of a row for every student.
    >
    > "Allan Murphy" wrote:
    >
    > > Use the AVG function in your query as an example
    > > In your query add the following column avg_marks:avg(marks) where marks

    is
    > > the marks entered
    > >
    > > --
    > > Allan Murphy
    > > Email: allanmurphy@unwired.com.au
    > > "Nada" <Nada@discussions.microsoft.com> wrote in message
    > > news:FF0AC5FA-6B1F-44B5-B1E7-4498F887303C@microsoft.com...
    > > > Hi,
    > > > I am a novice to Access.
    > > > In a query or form, I want to show instantly the average of the marks
    > > > entered. Is it possible?
    > > > Thanks
    > > > Nada

    > >
    > >
    > >
     
  9. Nada

    Nada
    Expand Collapse
    Guest

    Yes, it is ;)


    "Jeff Boyce" wrote:

    > And I'll add one more chime-in...
    >
    > If you have designed a well-normalized data structure, the AVG() function
    > (or DAVG(), depending on where you are doing this) will return the average
    > of a COLUMN of values.
    >
    > If your data structure is more like a spreadsheet, using one column/cell per
    > value, Access does not have a function that sums, averages, etc. ACROSS
    > columns.
    >
    > Is your data a "spreadsheet"?
    >
    > --
    > Regards
    >
    > Jeff Boyce
    > <Office/Access MVP>
    >
    > "Nada" <Nada@discussions.microsoft.com> wrote in message
    > news:FF0AC5FA-6B1F-44B5-B1E7-4498F887303C@microsoft.com...
    > > Hi,
    > > I am a novice to Access.
    > > In a query or form, I want to show instantly the average of the marks
    > > entered. Is it possible?
    > > Thanks
    > > Nada

    >
    >
     
  10. Steve Schapel

    Steve Schapel
    Expand Collapse
    Guest

    Nada,

    While Allan's suggestion is an interesting workaround, I have a question
    for you... Is your table structure "set in concrete", or could you
    consider a review of your design? You are using a database, and the
    ideal solution would be to set it up according to database principles.
    I imagine the effort to do so would be well worth it in the end.

    --
    Steve Schapel, Microsoft Access MVP


    Allan Murphy wrote:
    > Nada
    >
    > Add another column and depending on how many subjects do the following
    >
    > Student_avg:([subject1]+[subject2] .... [subjectx])/no of subjects
    >
    > What the above does for each student is add all the subject marks then
    > divide the total marks by the total number of subjects
    >
    > If the students do not do all the same subjects then a bit of coding will be
    > required.
    >
     
  11. Jeff Boyce

    Jeff Boyce
    Expand Collapse
    Guest

    Please see Steve's suggestion.

    Access makes a fine relational database, but a poor 'spreadsheet'. Both you
    and Access will have to work a lot harder if you are trying to make it do
    spread-sheetly things.

    Any reason you couldn't export your data to a spreadsheet for these
    calculations?

    --
    Regards

    Jeff Boyce
    <Office/Access MVP>

    "Nada" <Nada@discussions.microsoft.com> wrote in message
    news:1D48E6F7-596F-433A-A45D-57518EA7CBEE@microsoft.com...
    > Yes, it is ;)
    >
    >
    > "Jeff Boyce" wrote:
    >
    > > And I'll add one more chime-in...
    > >
    > > If you have designed a well-normalized data structure, the AVG()

    function
    > > (or DAVG(), depending on where you are doing this) will return the

    average
    > > of a COLUMN of values.
    > >
    > > If your data structure is more like a spreadsheet, using one column/cell

    per
    > > value, Access does not have a function that sums, averages, etc. ACROSS
    > > columns.
    > >
    > > Is your data a "spreadsheet"?
    > >
    > > --
    > > Regards
    > >
    > > Jeff Boyce
    > > <Office/Access MVP>
    > >
    > > "Nada" <Nada@discussions.microsoft.com> wrote in message
    > > news:FF0AC5FA-6B1F-44B5-B1E7-4498F887303C@microsoft.com...
    > > > Hi,
    > > > I am a novice to Access.
    > > > In a query or form, I want to show instantly the average of the marks
    > > > entered. Is it possible?
    > > > Thanks
    > > > Nada

    > >
    > >
     
  12. Nada

    Nada
    Expand Collapse
    Guest

    Thanks Jeff,
    I wanted the teachers to see the average when the marks are entered.


    "Jeff Boyce" wrote:

    > Please see Steve's suggestion.
    >
    > Access makes a fine relational database, but a poor 'spreadsheet'. Both you
    > and Access will have to work a lot harder if you are trying to make it do
    > spread-sheetly things.
    >
    > Any reason you couldn't export your data to a spreadsheet for these
    > calculations?
    >
    > --
    > Regards
    >
    > Jeff Boyce
    > <Office/Access MVP>
    >
    > "Nada" <Nada@discussions.microsoft.com> wrote in message
    > news:1D48E6F7-596F-433A-A45D-57518EA7CBEE@microsoft.com...
    > > Yes, it is ;)
    > >
    > >
    > > "Jeff Boyce" wrote:
    > >
    > > > And I'll add one more chime-in...
    > > >
    > > > If you have designed a well-normalized data structure, the AVG()

    > function
    > > > (or DAVG(), depending on where you are doing this) will return the

    > average
    > > > of a COLUMN of values.
    > > >
    > > > If your data structure is more like a spreadsheet, using one column/cell

    > per
    > > > value, Access does not have a function that sums, averages, etc. ACROSS
    > > > columns.
    > > >
    > > > Is your data a "spreadsheet"?
    > > >
    > > > --
    > > > Regards
    > > >
    > > > Jeff Boyce
    > > > <Office/Access MVP>
    > > >
    > > > "Nada" <Nada@discussions.microsoft.com> wrote in message
    > > > news:FF0AC5FA-6B1F-44B5-B1E7-4498F887303C@microsoft.com...
    > > > > Hi,
    > > > > I am a novice to Access.
    > > > > In a query or form, I want to show instantly the average of the marks
    > > > > entered. Is it possible?
    > > > > Thanks
    > > > > Nada
    > > >
    > > >

    >
    >
     

Share This Page