Forum Discussion

MeiyuC's avatar
MeiyuC
Regular Visitor
11 months ago
Solved

How to Automatically Change Default Selection in Slicer Based on Excel Dates?

I need help setting up a slicer in Power BI to automatically switch its default selection based on date ranges in an Excel table, while still showing all options (e.g., F0, F1, F2, F3).

 

Example:

  • If today's date is 10/10/2025, the slicer should default to F3 but still display F0, F1, F2, and F3 for manual selection.
  • If the date changes, the default should adjust based on the table logic.


 

 

I’ve tried using DAX to filter the slicer, but while the default switches correctly (e.g., to F3), all other options disappear. I need all options to still be visible for manual selection.

 

 

  • Thanks for the screenshots and detail, that helps me understand for sure.  I think you've got a good solution but the reason the slicer didn't switch to the newest F selection is because of the persistent filtering on the report.  Even though it knows that one is no longer = Yes, it saves the selection from the last report load.  You can disable this by disabling persistent filtering on the report itself and that should switch the selection just fine.  Screenshot of where to change this for this report:

     

    To also show the other selections in the slicer, I am not aware of how to do that since your really want it only to select the Yes option and you are accomplishing that selection through filtering.  Removing the filter would show the options but not guarantee the selection.

5 Replies

  • Could you post the DAX you used to filter the slicer so we can get a better idea of what you've tried so far?

  • MeiyuC's avatar
    MeiyuC
    Regular Visitor

    Sure. Column Key Figure is used for the single select slicer. I created an new column ,"Is Current F" based on the information from the table "Dynamic F date." 



    Then I applied this new column as a filter. I expected the default selection for F to automatically change according to the date. However, as shown in the second screenshot, when 'Is Current F' = YES, the default does not switch to F2 but remains set to F1.

    This is the first issue, and the second issue is that I don't want to make other options invisible; I want to show all options, as in the post, while automatically changing the default selection.

     

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

      Thanks for the screenshots and detail, that helps me understand for sure.  I think you've got a good solution but the reason the slicer didn't switch to the newest F selection is because of the persistent filtering on the report.  Even though it knows that one is no longer = Yes, it saves the selection from the last report load.  You can disable this by disabling persistent filtering on the report itself and that should switch the selection just fine.  Screenshot of where to change this for this report:

       

      To also show the other selections in the slicer, I am not aware of how to do that since your really want it only to select the Yes option and you are accomplishing that selection through filtering.  Removing the filter would show the options but not guarantee the selection.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi MeiyuC 

    I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.


    Thank you.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi MeiyuC 

    May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.


    Thank you