DAX Aggregation - SUMX function


Advertisements

Description

Returns the sum of an expression evaluated for each row in a table.

Syntax

SUMX (<table>, <expression>) 

Parameters

Sr.No. Parameter & Description
1

table

The table containing the rows for which the expression will be evaluated.

2

expression

The expression to be evaluated for each row of the table.

Return Value

A decimal number.

Remarks

Only the numbers in the column that results by evaluating the expression are counted.

Blanks, logical values, and text are ignored.

Example

USA Gold Medal Count:= SUMX(
   Results,IF(AND([Country] = "USA",[Medal] = "Gold") = TRUE(),1,0)
) 
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