Forum Discussion
Anonymous
4 years agoNot applicable
Using multiple slicers in a Measure
Hi, Here is what I have and want to achieve: 1) I have a table with a category column 2) Then I have multiple slicers related to each category in the category column 3) Now I want to write a ...
v-kkf-msft
4 years agoCommunity Support
Hi Anonymous ,
I am not sure if I understood your question correctly. My output is that if the value in the slicer is not 0, then calculate value for category A and category B.
Measure =
VAR A =
CALCULATE (
[Category_A_formula],
FILTER ( 'Sample Data', 'Sample Data'[Category] = "Category A" )
)
VAR B =
CALCULATE (
[Category_B_formula],
FILTER ( 'Sample Data', 'Sample Data'[Category] = "Category B" )
)
RETURN
SWITCH (
TRUE (),
[Category_A_selection] <> 0
&& [Category_B_selection] <> 0, A + B,
[Category_A_selection] <> 0, A,
[Category_B_selection] <> 0, B,
SUM ( 'Sample Data'[another_column] )
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.