DAX Aggregation - AVERAGEX function


Advertisements

Description

Calculates the average (arithmetic mean) of a set of expressions evaluated over a table.

Syntax

AVERAGEX (<table>, <expression>)

Parameters

Sr.No. Parameter & Description
1

table

Name of a table, or an expression that specifies the table over which the aggregation can be performed.

2

expression

An expression with a scalar result, which will be evaluated for each row of the table in the first argument.

Return Value

A decimal number.

Remarks

The AVERAGEX function enables you to evaluate expressions for each row of a table, and then take the resulting set of values and calculate its arithmetic mean. Therefore, the function takes a table as its first argument and an expression as the second argument.

In all other respects, AVERAGEX follows the same rules as AVERAGE. You cannot include non-numeric or null cells.

Example

= AVERAGEX (East_Sales,East_Sales[Unit Price]*East_Sales[No. of Units]) 
dax_functions_aggregation.htm

Useful Video Courses


Video

Mastering DAX and Data Models in Power BI Desktop

53 Lectures 5.5 hours

Abhay Gadiya

Video

Mastering DAX Studio

Featured

24 Lectures 2 hours

Randy Minder

Video

DAX / Power BI - Customer and Sales Analysis Deep Dive

26 Lectures 4.5 hours

Randy Minder

Advertisements