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])))
- jmcph5 years ago
Helper III
Hi amitchandak , what do you mean an independent slicer?
I created a separate tab to test the measure you provided but it still shows the selected category only.
Where could i have gone wrong? Or i have misinterpreted the measure you gave.
Still thank you for answering!
- jmcph5 years ago
Helper III
Yeah! This totally works! I just didnt understand at first on what you mean by independent slicer.
Thank you!
- Anonymous5 years agoNot applicable
Thank you so much! This was immensly helpful.
- Anonymous5 years agoNot applicable
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])