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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Difference between Calculate and Sum

Hi all, 

 

As I am exploring DAX, I wonder if there is a difference between Calculate and Sum in DAX.

 

Hope to receive guidance from yall.

 

Cheers!

1 ACCEPTED SOLUTION
GilbertQ
Super User
Super User

Hi @Anonymous

 

I think it is best explained in this blog post below by PowerPivotPro.

 

What a SUM does is it will SUM the values to give you a total.

What CALCULATE will do is give you the ability to change the filter context of your measure. And this is where you can do some amazing things with CALCULATE like YTD, Prior YTD etc using CALCULATE.

 

https://powerpivotpro.com/2014/10/sum-sumx-or-calculatechoices-choices/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

1 REPLY 1
GilbertQ
Super User
Super User

Hi @Anonymous

 

I think it is best explained in this blog post below by PowerPivotPro.

 

What a SUM does is it will SUM the values to give you a total.

What CALCULATE will do is give you the ability to change the filter context of your measure. And this is where you can do some amazing things with CALCULATE like YTD, Prior YTD etc using CALCULATE.

 

https://powerpivotpro.com/2014/10/sum-sumx-or-calculatechoices-choices/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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