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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
PBInterest
Frequent Visitor

Question about when to SUM values in a measures vs. SUM of two measures

Lets say I have two values, SalesAmount and DiscountAmount. SalesAmount minus the DiscountAmount is the NetSaleAmount.

 

I can create a measure something like: NetSaleAmount = (SUM(SalesAmount) - SUM(DiscountAmount).

 

or

 

I can create two measures, one for SalesAmount and one for DiscountAmount and do something like: NetSalesAmount = [SalesAmount] - [DiscountAmount]?

 

If I have to use the NetSalesAmount result in other measures in my model which way is better for overall performance in the model? 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@PBInterest There shouldn't be any real performance difference I would not think as either way DAX should essentially produce the same end query. You can check this using DAX Studio or by using the Performance Analyzer and copying the DAX query produced and comparing.

 

Really, boils down to a preference and if you need to use Sales Amount and Discount Amount in other measures. Many people advocate for creating simple aggregation measures for base value columns and then hiding the columns and only exposing the measures. The downside to this is that if you need a bunch of different aggregations, SUM, AVERAGE, MAX, MIN, etc. you can end up with a lot of base measures which might create confusion.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@PBInterest There shouldn't be any real performance difference I would not think as either way DAX should essentially produce the same end query. You can check this using DAX Studio or by using the Performance Analyzer and copying the DAX query produced and comparing.

 

Really, boils down to a preference and if you need to use Sales Amount and Discount Amount in other measures. Many people advocate for creating simple aggregation measures for base value columns and then hiding the columns and only exposing the measures. The downside to this is that if you need a bunch of different aggregations, SUM, AVERAGE, MAX, MIN, etc. you can end up with a lot of base measures which might create confusion.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

That's helpful, thanks for the reply.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.