Forum Discussion
Custom Slicer: All values and all except one
- Anonymous5 years ago
Hi crln-blue ,
Based on your description, you can do some steps as follows.
1. create a table that contains only "All materials except material B" and "All materials". (I used "Enter Data" option)
2. create a measure and drag it to the filter of the table visual.(is equal to 1)
Measure =
var x1=SELECTEDVALUE('slicer'[S])
var x2=IF(MAX('Query1'[material])<>BLANK(),"All materials")
var x3=IF(MAX('Query1'[material])<>"B","All materials except material B")
return
IF(x1="All materials",1,IF(x1=x3,1,0))Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi crln-blue ,
I'm glad that I can help you resolve this issue. The max function in this measure is used to define the exact value of each row. The value of measure must be calculated according to the context. The logic you gave is that everything except B is "All materials except material B", and the rest is only B, so only B is called "All materials". My method is to create two different variables that will show different values when different conditions are met. So I think the MAX function is not the cause of the error.
Best Regards,
Yuna