Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Why using CALCULATE(SUM()) ?

I see often measures written as:

 

Measure CY:=

CALCULATE(

    SUM('Table'[Col])

)

 

What’s the use of CALCULATE there?

 

Shouldn’t it just be written as Measure CY:=SUM('Table'[Col])

 

 

(I want to rewrite them as the latter form, but I wanted to be sure first...)

  • Anonymous 

    When you create a new measure, you do not need to warp your formula with CALCULATE as any measure default is wrapped within a CALCULATE function so you can just write:

    CY:=SUM('Table'[Col])




1 Reply

  • Anonymous 

    When you create a new measure, you do not need to warp your formula with CALCULATE as any measure default is wrapped within a CALCULATE function so you can just write:

    CY:=SUM('Table'[Col])