Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
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?
Solved! Go to Solution.
@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.
@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.
That's helpful, thanks for the reply.
User | Count |
---|---|
9 | |
8 | |
5 | |
4 | |
3 |