Forum Discussion

d9801's avatar
d9801
Frequent Visitor
1 year ago
Solved

Disabling Slicers when using another Slicer

Hi, 

 

I am trying to disable the Date Filter when Year/Quarter is selected in Date Selection. The formula that I am using to achieve this is:

 


I then add Disable Date Slicers to the Filter pane under Filter on this visual:

I know the formula is working because of the i (Data range not available):

 

However, the date range does not grey out like the following 2 videos:
Dynamically Enable and Disable Slicers in Power BI

Custom Date Period Selections in Power BI

 

 

How do I get this box to grey out or remove it's functionality similar to the videos above? Is there a setting that I am missing?

 

 

 

 

 

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi d9801 ,

     

    The Date filter can only be used if the value of the filter is “Custom”.

    Please try:

    Disable Date Slicers = IF(SELECTEDVALUE('Date Calculation Selection'[Date Selection]) = "Year/Quarter",0,1)

    Or

    Disable Date Slicers = IF(SELECTEDVALUE('Date Calculation Selection'[Date Selection]) = "Date Range",1,0)

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

4 Replies

  • Hi d9801 ,

     

    Be sure that you have the edit interactions between the two slicers active:

     

     

     



  • d9801's avatar
    d9801
    Frequent Visitor

    I do have the interactions on: 

     

    That is why I am confused.

    • MFelix's avatar
      MFelix
      Super User

      Can you share a sample file pleasse

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi d9801 ,

     

    The Date filter can only be used if the value of the filter is “Custom”.

    Please try:

    Disable Date Slicers = IF(SELECTEDVALUE('Date Calculation Selection'[Date Selection]) = "Year/Quarter",0,1)

    Or

    Disable Date Slicers = IF(SELECTEDVALUE('Date Calculation Selection'[Date Selection]) = "Date Range",1,0)

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum