Hi,
Here is my scenario:
Type Detail Cost
Fruit Apples 1.50
Fruit Bananas 2.00
Fruit Oranges 0 or Null Value
Fruit Pears 1.75
So I have 4 records but only 3 have a value. In the query when I go AVG(myTable.[Fruit]) Grouped BY and in a second column have myTable.Detail Is Not Null or myTable.Detail <>0.
I get an average based on 1.50 + 2.00 + 1.75 but divided by 4 records even though the average should be based on dividing by 3.
Anyone know how I can get the average to only divide by the number of records that have a value?
Thanks!
Derek
Here is my scenario:
Type Detail Cost
Fruit Apples 1.50
Fruit Bananas 2.00
Fruit Oranges 0 or Null Value
Fruit Pears 1.75
So I have 4 records but only 3 have a value. In the query when I go AVG(myTable.[Fruit]) Grouped BY and in a second column have myTable.Detail Is Not Null or myTable.Detail <>0.
I get an average based on 1.50 + 2.00 + 1.75 but divided by 4 records even though the average should be based on dividing by 3.
Anyone know how I can get the average to only divide by the number of records that have a value?
Thanks!
Derek