Forum Discussion
Mattm1989
1 year agoRegular Visitor
Issue with variance calculations
Hi Please could someone help me understand what I am doing wrong? I am using variables to calculate the sum of the same column but using different selections based on a different column via s...
- 1 year ago
Hi Mattm1989
Unfortunately the slicers count as an AND filter on the card.
Meaning it tries to filter your Master table to only rows that fufill BOTH criteria.
You can either:
Use one slicer and have the two measures return only one of the items in the list. If the user can only ever choose one using Min on one and max on the other would work.
Var01 =VAR Actual_Bud_01 = Max(Master[Actual / Budget1])VAR Total_Act_Bud_01 = CALCULATE(SUM(Master[Amt USD - PTD1]), Master[Actual / Budget1] = Actual_Bud_01)RETURN Total_Act_Bud_01Or you have a second copy of the Master[Actual/budget] column in a seperate and completely unlinked table for the second calculation.Var01 =VAR Actual_Bud_01 = SelectedValue(MasterCopy[Actual / Budget1])VAR Total_Act_Bud_01 = CALCULATE(SUM(Master[Amt USD - PTD1]), Master[Actual / Budget1] = Actual_Bud_01)RETURN Total_Act_Bud_01Let me know if you get stuck 🙂
Mattm1989
1 year agoRegular Visitor
Makes complete sense now! I've gone for a completely separate table on second calc and getting the result I require! thank you!