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

Related Support Forum Posts

Slicer for 30, 60, 90 days forward
Quick Measures using Averages
DAX formula involving Variable and AverageX

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])

Related DAX Functions


Related Course Modules



Download our comprehensive DAX Formula Reference Guide as perfect companion as you learn how to use DAX formulas within Power BI.

Download DAX Formulas Reference Guide
Download DAX Formula Reference Guide