Calculate Average excluding zero values in cells

I need to calculate the average for a set of numbers, but I do not want to include the zero values in my calculation.  For instance, in the month of July i have values of 8.4 and 5.2, their average would be 6.8 but my table has multiple rows for all the days in July and when i calculate the average it brings all those zero value in and makes the average extremely low.  

I am using PowerPivot and Access to get the data.  Is the a function i can use to calculate this average?
szadrogaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ProfessorJimJamCommented:
you can do that with =AVERAGE(IF(A1:A10<>0,A1:A10))   old excel

and for new excel =AVERAGEIF(A1:A10,"<>0")
0
szadrogaAuthor Commented:
does this function, AVERAGEIF translate in PowerPivot?   I am getting an error message...
0
ProfessorJimJamCommented:
well i thought you are using excel.

for powerpivot DAX you could try something like this

YOURAVERAGE= CALCULATE(AVERAGE(Table1[ColumnA]), FILTER(Table1, Table1[ColumnB] = EARLIER(Table1[ColumnB]))

ColumnB will be your criteria of <>0
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Saurabh Singh TeotiaCommented:
A Slight different version then Jim you can simply use..

Avg:=CALCULATE(AVERAGE([Header]),filter(Table1,[Header]>0))

Open in new window


Enclosed the workbook for your reference..Just open the powerpivot view to see more details..

Saurabh...
powerpivot.xlsx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
szadrogaAuthor Commented:
i downloaded your xlsx file and went into PowerPivot > Manage, but its empty?  am i looking in the wrong place
0
Saurabh Singh TeotiaCommented:
Check at the bottom of this or create a pivot table of the data you will see avg calculated field their...
0
szadrogaAuthor Commented:
both worked, thx!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.