Forum Discussion

maxbradley's avatar
maxbradley
Frequent Visitor
4 years ago

switching between slicer filters

I have two slicers, one for absolute date, and one for relative date. If left alone, the data displayed will be that which meets both slicers. I'd like to be able to enable only one slicer at a time, so the user doesn't need to alter the other slicer so that it doesn't obstruct the one they are interested in.

 

I've had a look at this solution, but it only seems to prevent the dropdown list from displaying. As neither of these slicers have dropdowns, they both continue to operate with no issues.

 

I've also tried using buttons, but it seems the slicer interaction state is not recorded in a bookmark, so switching between the bookmarks doesn't work either.

 

Can you think of another approach to make only one of two slicers 'active' at a time, or am I wrong about the two approaches I've tried so far?

 

Thanks in advance.

9 Replies

  • How will Power BI know which of your slicers is currently "active" ?  Via a third slicer?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Without knowing what your relationships look like it's hard to say, but if you have two different date tables with relationships to your fact table, you could probably do this with a calculation group instead.  Youd have calculated items for "Relative" date and "Absolute" date that would populate a single date slicer with the appropriate date values

  • maxbradley's avatar
    maxbradley
    Frequent Visitor

    lbendlin a third slicer would work, but buttons would be sufficient too. If there was an inbuilt feature to disable slicers that would be good too but I'm sure there isn't.

     

    Anonymous It's actually the same date table. I work for a school, in the short term it is convenient to see data from the past one or two weeks, where the relative date filter would suffice, but school terms don't fit well with months/quarters etc, and so at this point it would be easier for users to input the dates themselves. 

    • lbendlin's avatar
      lbendlin
      Icon for Super User rankSuper User

      There's your answer. Remove the slicers and buttons. Put the date column in the filter panel. Teach your users how to use it. Allow users to change the filter type so they can decide when to use absolute or relative filtering.

      • maxbradley's avatar
        maxbradley
        Frequent Visitor

        That would be a perfect solution if it weren't for one other thing I didn't mention. The report is shared with teachers via our MIS. This lets them see and interact with the report, but peripheral functions like those filters and printing pdfs of the reports aren't available this way. 

         

        At the moment I've just left a note to clear the filter that the user isn't using. I suspect this might be a bit too unique a situation for an easy answer, but thanks for your help.

  • PaulDBrown's avatar
    PaulDBrown
    Icon for Community Champion rankCommunity Champion

    You could add a column for "Terms" to the date table, but I guess it would require updating...(perhaps by using an external Excel table with the term dates as a source)

  • v-henryk-mstf's avatar
    v-henryk-mstf
    Icon for Community Support rankCommunity Support

    Hi maxbradley ,

     

    Based on your description, I think you can use the Edit interaction function to specify the slicer to filter the corresponding custom visual. Did a simple test with the following reference:   link

    If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


    Best Regards,
    Henry


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

    • maxbradley's avatar
      maxbradley
      Frequent Visitor

      That would do it, but requires that the end users edit the report every time they want to shift between absolute and relative filters. I tried doing exactly this and saving the different states as bookmarks to attach to buttons,  but it seems like filter interactions are not saved in bookmarks, is this correct?