Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Create a new measyre

Hello team

 

I have a table with the following layout. Capitalized and Costs are imported from files. The delta is the calculation between those 2 (costs-capitalized). How can i create a calculated measure to perform the calculation in PBI?

 

Tx

 

Measure GroupTotal 
Capitalized100 
Costs200 
delta100=Costs-Capitalized
  • try this

     

    delta =
    VAR capital =
    CALCULATE ( SUM ( [table[total] ), table[measure group] = "Capitalized" )
    VAR costs =
    CALCULATE ( SUM ( [table[total] ), table[measure group] = "Costs" )
    VAR result = costs - capital
    RETURN
    result

1 Reply

  • vanessafvg's avatar
    vanessafvg
    Icon for Community Champion rankCommunity Champion

    try this

     

    delta =
    VAR capital =
    CALCULATE ( SUM ( [table[total] ), table[measure group] = "Capitalized" )
    VAR costs =
    CALCULATE ( SUM ( [table[total] ), table[measure group] = "Costs" )
    VAR result = costs - capital
    RETURN
    result