Forum Discussion
what if to affect selected values only
- 5 years ago
jmcph , Make sure Category is an independent slicer
measure =
Var SalesQty = Sum ( Sales[Qty])
Return
calculate([SalesQty] * (1 * [Forecast Qty Value] ), filter(Table, Table[CATEGORY] = selectedvalue(CATEGORY[CATEGORY])))
+calculate([SalesQty], filter(Table, Table[CATEGORY] <> selectedvalue(CATEGORY[CATEGORY])))
jmcph , Make sure Category is an independent slicer
measure =
Var SalesQty = Sum ( Sales[Qty])
Return
calculate([SalesQty] * (1 * [Forecast Qty Value] ), filter(Table, Table[CATEGORY] = selectedvalue(CATEGORY[CATEGORY])))
+calculate([SalesQty], filter(Table, Table[CATEGORY] <> selectedvalue(CATEGORY[CATEGORY])))
What if you have an additional filter?
For example, what if you only want to adjust the forecast for the selected category and for only a selected region, How would you do that?
- Anonymous5 years agoNot applicable
Nevermind amitchandak . I created a calculated table for that second filter and adjusted the formula below: calculate([SalesQty] * (1 * [Forecast Qty Value] ), filter(Table, Table[CATEGORY] = selectedvalue(CATEGORY[CATEGORY])))
+calculate([SalesQty], filter(Table, Table[CATEGORY] <> selectedvalue(CATEGORY[CATEGORY]) || Table[CATEGORY] <> selectedvalue(CATEGORY2[CATEGORY2])