SUMX Function
Power Pivot

SUMX Function in Power Pivot

In this article, we have explained how to use Measure in Pivot Pivot data model. We have taken the example of SUMX function to calculate the revenue. On the base of Price Per Unit from related table and Quantity from fact table.

SUMX function:

SUMX function returns the sum of an expression evaluated for each row in a table. it takes as its first argument a table, or an expression that returns a table. The second argument is a column that contains the numbers you want to sum, or an expression that evaluates to a column.

Syntax

SUMX(<table>, <expression>) 

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

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

Below is the function which we have used in this scenario:

Revenue (Measure):=SUMX(Orders,Orders[Quantity]*RELATED('Product Master'[Price per unit]))
SUMX Function in Power Pivot
SUMX Function in Power Pivot

Click here to download the practice file.

Watch the step by step video tutorial:

PK
My Name is PK. I am founder of PK-AnExcelExpert.com. I am a Microsoft Certified Professional. I have more than 10 years of experience in Data Visualization, Excel Automation and dashboard creation. Excel is my passion and I like to do always something innovative in Excel and share it with other people.
https://www.pk-anexcelexpert.com