Forum Discussion

jkhan's avatar
jkhan
Helper III
3 years ago

Slicer Option

Hi, 

Please help to achieve below requirement for Slicer. 

 

We have requirement for Slicer. Suppose we select Project Name in Slicer by default other slicer is showing All. 

 

 

But we need to show respective Values of other Slicer instead of All in regards of Project Name Slicer. 

 

Like below in instead of ALL 

 

 Please help to achieve this requirement. 

 

Thanks & Best Regards

Jamsher 

12 Replies

  • v-xiaotang's avatar
    v-xiaotang
    Community Support

    Hi jkhan 

    You can try this, create the measure below and put it into visual-level filter,

    Measure = 
    var _value=SELECTEDVALUE(Table1[Slicer1])
    return SWITCH(TRUE(),
    _value="a",IF(MIN(Table2[slicer2])<4,1),
    _value="b",IF(MIN(Table2[slicer2])<6,1),
    _value="c",IF(MIN(Table2[slicer2])<8,1))

     

    result

    The above is an example, you can change the measure according to your needs.

     

    Best Regards,

    Community Support Team _Tang

    If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

    • jkhan's avatar
      jkhan
      Helper III

      Hi v-xiaotang 

       

      If i change the slicer from List to Dropdown it begin to show All.

       

      Thanks & Regards

      Jamsher

       

      • v-xiaotang's avatar
        v-xiaotang
        Community Support

        Hi jkhan 

        When you expand all, the contents are the same as the contents of the list type slicer. Please see below

         

         

        Best Regards,

        Community Support Team _Tang

        If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

  • PaulDBrown's avatar
    PaulDBrown
    Community Champion

    If you want the slicers to show the values available based on a selection, you can use a measure to filter the slicers. Something along the lines of:

    Filter slicers =
    COUNTROWS ( RELATEDTABLE ( 'Fact Table' ) )
    

    where 'Fact Table' is the table the slicers relate to.

    Add this measure to the filter pane of each of the slicers and set the value to greater or equal to 1

    Reference:

    https://learn.microsoft.com/en-us/dax/relatedtable-function-dax 

    (Basically RELATEDTABLE reverses the direction of the relationship in a dimension to fact table)

  • daXtreme's avatar
    daXtreme
    Solution Sage

    Slicers can be filtered by measures in response to selections made in other parts of the report, including other slicers. Use Filter Pane of the slicer to do this.

  • Hi 

    Thanks for reply. Can we do in slicer. 

    Thanks & Regards

    Jamsher

  • v-xiaotang Thanks for providing solution. I will try and update accordingly. 

    Thanks & Best Regards

    Jamsher

  • Thanks PaulDBrown  for your reply. I will work on it and update accordingly. 

     

    Thanks & Best Regards

    Jamsher

  • @PaulDBrown  in my case all Slicer value is from same table. RELATEDTABLE  we can use if we have two table involved and relationship between them. 

     

    Thanks & Regards

    Jamsher