Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 years ago
Solved

Average excluding zero's

How would I write a formula that gives me the average sales but excludes any instances when the sales are zero.
  • Anonymous's avatar
    Anonymous
    10 years ago

    Assuming this is a simple average of rows of sale data, and not an average of another measure that aggregates sales in some other way...

     

    Avg Sales= CALCULATE( AVERAGE(TableName[SaleAmount]), FILTER(TableName, TableName[SaleAmount] <> 0 ))