Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Euro0681
Helper II
Helper II

SUMX vs SUMX w/Summarize

I have create a measure that sums another measure (reason for this is to correct the totals):

Measure 1 = if([Quantity] < 0 || [Price] < 0 || [Difference] = 0, 0, [Quantity] * [Price])
Measure 2 = SUMX('Table', [Measure 1])  <--- This total is 10,000

I then re-created the same measure using 'SUMMARIZE' trying to help with performance since 'Measure 2' (breaks the visual when applied with other measures)

Measure 3 = SUMX( SUMMARIZE( 'Table', 'Table'[ProductName] ), [Measure 1] )  <--- Total is 9,000

But when using this version, the total is 9,000, Why? 
Also I know SUMX is hurting the performance (especially because of the conditional measure) , if anyone has any suggestions helping to optimize it would greatly be appreciated PLEASE and Thank you! (I can only create measure LIVE CONNECTION) 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @Euro0681 

Measure 2 scans the whole table, Measure 3 scans the unique list of 'Table'[ProductName]. It seems the 'Table'[ProductName] column has blank rows.

View solution in original post

2 REPLIES 2
FreemanZ
Super User
Super User

hi @Euro0681 

Measure 2 scans the whole table, Measure 3 scans the unique list of 'Table'[ProductName]. It seems the 'Table'[ProductName] column has blank rows.

Thanks, I was thinking the same but was just wanting to get confirmation!

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.