Cheat Sheets/Power BI/AVERAGEX
DAX function

AVERAGEXDAX function reference

Mean of a per-row expression.

Syntax

dax
AVERAGEX(<table>, <expression>)

Examples

dax
AVERAGEX(Sales, Sales[Qty] * Sales[Price])
A number

CALCULATE triggers context transition so SUM re-evaluates for each OrderID rather than averaging individual line amounts.

dax
AVERAGEX(VALUES(Sales[OrderID]), CALCULATE(SUM(Sales[Amount])))
Average order value at the order level, not the line level
dax
AVERAGEX(Product, [Total Sales])
Average product's sales, including products that sold nothing

Common mistakes & gotchas

Related DAX functions

From Aggregations

Used in these tutorials

← Back to the Power BI (DAX) cheat sheet