Forum Discussion

crln-blue's avatar
crln-blue
Icon for Post Patron rankPost Patron
5 years ago
Solved

Custom Slicer: All values and all except one

Hello!   I'm having some trouble regarding the logic of my slicer.   I'm aware that to create a slicer, you have to drag the column and the unique values of that certain column will serve as choi...
  • Anonymous's avatar
    Anonymous
    5 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.