How does the AVERAGEX function (DAX) work?
The AVERAGEX function (DAX) calculates the average of a set of expressions evaluated for each row of a table. It will then take the resulting set of values and calculate its arithmetic mean.
AVERAGEX Formula Syntax
How do you use the AVERAGEX function?
The function takes a table on which the aggregation is performed as its first argument, and an expression with a scalar result as its second argument.
Related Blog Posts
Considerations when using the AVERAGEX function
The AVERAGEX function will not allow you to include non-numeric or null cells. Both the table and expression arguments are required.
If there are no rows that need to be averaged, the function will return a blank. If there are rows but they do not meet the criteria, the function returns 0.
Related Video Tutorials
Formula examples using the AVERAGEX function
=AVERAGEX(InternetSales, InternetSales[Freight]+ InternetSales[TaxAmt])
= AVERAGEX (East_Sales,East_Sales[Unit Price]*East_Sales[No. of Units])
=AVERAGEX(all(DimDate[CalendarYear]), FactSales[Sum of SalesAmount])