Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Disbaling slicer

Hi

 

In my Power BI report, I have four slicers coming from the same Date table: Year (e.g. Date[Year]) Month (e.g. Date[Month]) Day (e.g. Date[Day]) Date Slider (a "Between" slicer on Date[Date]) The requirement is:

 

 

When any of the Year, Month, or Day slicers are selected, the Date Slider should be hidden or disabled.

 

 

When none of the Year, Month, or Day slicers are selected (i.e., all are cleared), the Date Slider should become visible, and the Year, Month, and Day slicers should be hidden or disabled in turn. I treid using visual level filter i.e if IF ( ISFILTERED('Date'[Year]) || ISFILTERED('Date'[Month]) || ISFILTERED('Date'[Day]), 0, -- Hide the date slider 1 -- Show the date slider ) not working. Cna anyone guide me on this

  • Hi Anonymous 

     

    Power BI does not currently allow slicers to be dynamically hidden or disabled using DAX or visual-level filters. Slicers are interactive elements and must remain visible for users to interact with them directly. You can simulate the effect of conditional visibility using a combination of DAX measures, bookmarks, and buttons.

     

    Create a DAX measure to detect if any of the Year, Month, or Day slicers are selected:

    DateSlicerToggle =

    IF (

        ISFILTERED('Date'[Year]) || ISFILTERED('Date'[Month]) || ISFILTERED('Date'[Day]),

        "YMD Selected",

        "None Selected"

    )

    Design two visual layouts, one with only the Date Slider visible and other with only Year/Month/Day slicers visible.

    Set up bookmarks for each layout and use buttons or shapes to allow users to toggle between the two states.

    This approach allows you to guide users toward selecting either the Date Slider or the Year/Month/Day filters, without overlapping or conflicting slicers on the same page.

     

    I hope this helped! Feel free to ask any further questions. If this resolved your issue, please mark it as "Accept as Solution" and give us Kudos to assist others.

     

    Thank you.

5 Replies

  • remove all these slicers and use the filter pane instead.

  • v-sgandrathi's avatar
    v-sgandrathi
    Icon for Community Support rankCommunity Support

    Hi Anonymous 

     

    Power BI does not currently allow slicers to be dynamically hidden or disabled using DAX or visual-level filters. Slicers are interactive elements and must remain visible for users to interact with them directly. You can simulate the effect of conditional visibility using a combination of DAX measures, bookmarks, and buttons.

     

    Create a DAX measure to detect if any of the Year, Month, or Day slicers are selected:

    DateSlicerToggle =

    IF (

        ISFILTERED('Date'[Year]) || ISFILTERED('Date'[Month]) || ISFILTERED('Date'[Day]),

        "YMD Selected",

        "None Selected"

    )

    Design two visual layouts, one with only the Date Slider visible and other with only Year/Month/Day slicers visible.

    Set up bookmarks for each layout and use buttons or shapes to allow users to toggle between the two states.

    This approach allows you to guide users toward selecting either the Date Slider or the Year/Month/Day filters, without overlapping or conflicting slicers on the same page.

     

    I hope this helped! Feel free to ask any further questions. If this resolved your issue, please mark it as "Accept as Solution" and give us Kudos to assist others.

     

    Thank you.

    • v-sgandrathi's avatar
      v-sgandrathi
      Icon for Community Support rankCommunity Support

      Hi Anonymous ,  

      We wanted to follow up since we haven't heard back from you regarding our last response. We hope your issue has been resolved.

      If my answer resolved your query, please mark it as "Accept Answer" and give Kudos if it was helpful.

      If you need any further assistance, feel free to reach out.

      Thank you for being a valued member of the Microsoft Fabric Community Forum!

      • v-sgandrathi's avatar
        v-sgandrathi
        Icon for Community Support rankCommunity Support

        Hi Anonymous ,

         

        May I ask if you have gotten this issue resolved?

        If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.

         

        Thank you.