Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

DAX Calculation Aggregation not working

I'm getting some strange behavior with the below calculation. I'm wondering if anyone has a work around or better function.   Measure Calculation: Burn Total = Sum(Funding)  - Sum(Revenue)  = -30,0...
  • kcantor's avatar
    7 years ago

    Anonymous 

    Anytime I have a complex measure that does not behave as I expect, I break it into separate parts.

    Funding Sum = Sum(Funding) 

    Revenue Sum = Sum(Revenue)  

    Burn Total = [Funding Sum]-[Revenue Sum]

    Drop them all into a table and see where the breakage occurs. Fix the individual calculation that isn't working appropriately. Keep in mind that measure themselves do not take up room in the model and only calculated as used. If the measures work individually, build them into one useing VAR.

    Burn Total =

         VAR FundingSum = Sum(Funding) 

         VAR RevenueSum = Sum(Revenue)

    RETURN

         FundingSum - RevenueSum