|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
Avg Function not working in Access Hi, I want o remove average of two columns in Microsoft Access for that i have use avg() function.But when I am attempting to do this instead of average of two columns i am getting summed totals.I don't know what's my mistake can one tell me my mistake. |
#2
| |||
| |||
Re: Avg Function not working in Access Avg is a group function in Access.This is not as same as average function which we had in other, it's totally based on group.So if the group contains only 1 instance.Then avg() will be the same value of the underlying field or expression. |
#3
| |||
| |||
Re: Avg Function not working in Access In Access SQL function, Avg is based on rows not columns for example if a table contains two fields [Data1] and [Data2] If the table has 2 rows Row 1 [Data1]=3 [Data2]=4 Row 2 [Data1]=5 [Data2]=6 then fro removing average of this two columns in Access you need to write it as Avg([Data1]+[Data2])=[(3+4)+(5+6)]/2=9. Over here i have divide it by 2 because there are 2 rows in this example. |
#4
| |||
| |||
Re: Avg Function not working in Access You can also use the Avg function in the query design grid, in an SQL statement in SQL view of the Query window, or in an SQL statement within Visual Basic code. For example SELECT Position, Avg(Sal) AS AvgSal FROM EmployeeStatisticsTable GROUP BY Position |
![]() |
|
Tags: access, avg function |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting Memory Access Violation error into the RegisterClassEx function | Wave | Software Development | 5 | 28-06-2011 11:08 AM |
CMD+TAB function not working in mac os | Stranger01 | Operating Systems | 3 | 08-12-2010 01:00 PM |
I need a search function for my access database. | Superstar9 | Windows Software | 3 | 02-09-2009 11:33 PM |
Date() function problem in Access 2000. | Jerzy | Software Development | 3 | 30-07-2008 03:44 PM |
Excel function calculations used in MS Access query | akbar | MS Office Support | 1 | 23-05-2008 08:52 PM |