Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

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!
  • GilbertQ's avatar
    9 years ago

    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/