Forum Discussion
Trouble Calculating Percentage Difference
- 3 years ago
wrap the sum functions in a calculate function to change the context
e.g. OverCost = CALCULATE( SUM (Actuals[ActualCosts])) - CALCULATE(SUM (Plans[PlannedCosts])) / CALCULATE(SUM (Plans[PlannedCosts]))
wrap the sum functions in a calculate function to change the context
e.g. OverCost = CALCULATE( SUM (Actuals[ActualCosts])) - CALCULATE(SUM (Plans[PlannedCosts])) / CALCULATE(SUM (Plans[PlannedCosts]))
- VanNostrand3 years agoRegular Visitor
Thanks indeed with the CALCULATE function worked.
But in the same table "Plans" I tried to apply the same formula for something equal, which is the projects in over duration. There's another table named "Actual_Duration" that states the values in the column 'ActualDuration'.
OverDuration = (CALCULATE( SUM (Actual_Duration[ActualDuration])) - CALCULATE(SUM (Plans[PlannedDuration]))) / CALCULATE(SUM (Plans[PlannedDuration]))
Error: A circular dependency was detected: Plans[Column], Plans[OverCost], Plans[Column].