Forum Discussion
curtismob
3 years agoHelper IV
Override Year Slicer For Previous Measure
Hello, I have a matrix with monthly costs, along with the variances from month to month. I have a slicer to select the year, but I also want to inlcude the cost for the previous December, in order t...
- 3 years ago
Sorry about the previous post. The following formula works
DecCostPriorYr =VAR YearSelectedLessOne =SELECTEDVALUE(PlanCost[Year]) - 1VAR CostCalc =CALCULATE(SUM(PlanCost[Cost]),FILTER(ALL(PlanCost[Community],PlanCost[Month],PlanCost[Year]),PlanCost[Month] = 12 && PlanCost[Year] = YearSelectedLessOne))RETURNCostCalc
Pady
3 years agoHelper II
Sorry about the previous post. The following formula works
DecCostPriorYr =
VAR YearSelectedLessOne =
SELECTEDVALUE(PlanCost[Year]) - 1
VAR CostCalc =
CALCULATE(SUM(PlanCost[Cost]),
FILTER(ALL(PlanCost[Community],PlanCost[Month],PlanCost[Year]),
PlanCost[Month] = 12 && PlanCost[Year] = YearSelectedLessOne))
RETURN
CostCalc