Home>Blogs>Power Pivot>SUMX Function in Power Pivot
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:

 

Visit our YouTube channel to learn step-by-step video tutorials

Youtube.com/@PKAnExcelExpert

 

PK
Meet PK, the founder of PK-AnExcelExpert.com! With over 15 years of experience in Data Visualization, Excel Automation, and dashboard creation. PK is a Microsoft Certified Professional who has a passion for all things in Excel. PK loves to explore new and innovative ways to use Excel and is always eager to share his knowledge with others. With an eye for detail and a commitment to excellence, PK has become a go-to expert in the world of Excel. Whether you're looking to create stunning visualizations or streamline your workflow with automation, PK has the skills and expertise to help you succeed. Join the many satisfied clients who have benefited from PK's services and see how he can take your Excel skills to the next level!
https://www.pk-anexcelexpert.com