cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
beekee Regular Visitor
Regular Visitor

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

Accepted Solutions
Super User
Super User

Re: Difference between Calculate and Sum

Hi @beekee

 

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 Datanaut!"


Power BI Blog
1 REPLY 1
Super User
Super User

Re: Difference between Calculate and Sum

Hi @beekee

 

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 Datanaut!"


Power BI Blog

Helpful resources

Announcements
Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

PBI Community Highlights

PBI Community Highlights

Check out what's new in the Power BI Community!

Top Ideas
Users Online
Currently online: 20 members 805 guests
Please welcome our newest community members: