Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Button that changes filter selection

Hello, 

 

 

I would that when i click on "previous year" (it's now on a button format, but i am open to something new!) :

- the previous year on my year slicer is automatically selected

- and, that my 4 quarters on my quarter slicer is also selected 

 

It seems like bookmark isn't a solution for my case. 

 

Thank you for the support 

 

 

 

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous

     

    For the select button you asked, the slicer will automatically select.

     

    One possible reason is that you selected a slicer when creating the bookmark, which saves your current visual state.

     

    Therefore, when you connect to the bookmark through the button and enter the bookmark through the button, what is displayed is the page when you saved the bookmark.

     

    As the documentation says: "When editing a report in Power BI Desktop and the Power BI service, you can add bookmarks to capture the current state of a report page. Bookmarks save the current filters and slicers, cross-highlight visuals, and sort orders wait."

     

    Create report bookmarks in Power BI to share insights and build stories - Power BI | Microsoft Learn

     

    You can try to recreate the bookmark and take care to delete the selection in the slicer. 

     

    This may solve your problem. 

     

    Please see the pbix attachment below, I show a relevant example. In the "Default Selected" button, I selected the slicer when creating the bookmark, and the bookmark saved the slicer's state.

     

     

    Regards,

    Nono Chen

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hey Anonymous , thank you for your file! would your solution works if i have several "previous year".

    i.e: when i will add 2024 to my file, i will get 2022 & 2023 as previous years options. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous 

       

      You proposed adding 2024 to the file. At this time, 2022 and 2023 are also optional, depending on the data content you want to display.

       

      Slicers are a filtering method for displaying your data.

       

      Slicers in Power BI - Power BI | Microsoft Learn

       

      Regards,

      Nono Chen

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

      • Anonymous's avatar
        Anonymous
        Not applicable

        In this particular case, I will have to keep all 2022, 2023 & 2024 data, thus my issue ğŸ˜”