Forum Discussion

sr97's avatar
sr97
Frequent Visitor
1 year ago
Solved

Update date-slicer in bookmark automatically

Hi all, 

 

Is there a way to update the date-slicer in a bookmark automatically to the most current date in a excel-file? When i say most current date, i mean the latest date in a excel-file ( and not today's date)

 

When I update my Power BI with new excel-files, I need to update the bookmark ( Remove filters are connected to a bookmark)  so i get the most current date.

 

Is there a way, so when i press "Remove filters", the slicer will be updated with the most current date from the new excel-file i attach to a sharepoint-folder? 

 

 

  • Hi sr97 ,

     

    If the bookmark has the data turn on you cannnot do it since it saves the data at the point of the save of the bookmark.

     

    For this I suggest that you use a Clear Slicer button on your report page, be aware if you have any other slicers those will also be cleared.

6 Replies

  • 46's avatar
    46
    Regular Visitor

    Hi sr97
    To auto-update a Power BI bookmark's date slicer to the latest date in an Excel file from a SharePoint folder:

    1. Connect to SharePoint:
      • Get Data > SharePoint Folder, filter to .xlsx, sort by Date modified (descending), keep top 1 file, load data.
    2. Get Latest Date:
      • Create DAX measure: LatestDate = MAX('Table'[RecordDate]).
    3. Set Up Slicer:
      • Add slicer for RecordDate, sort descending, single-select.
    4. Update Bookmark:
      • Select latest date in slicer, update "Remove Filters" bookmark to capture slicer state.
      • Assign bookmark to button.
    5. Automate Refresh:
      • Publish to Power BI Service, set up scheduled refresh with SharePoint credentials.

    Test: Upload new Excel file, refresh dataset, click "Remove Filters"—slicer should show latest date.

    Note: Slicers can’t dynamically default to measures. For dynamic control, consider a helper table with a "Latest" option (ask for details if needed).

     

    If this solution works for you, mark it as ACEPTED — that way, other users with the same question can benefit from it as well.

  • Hi sr97 ,

     

    If the bookmark has the data turn on you cannnot do it since it saves the data at the point of the save of the bookmark.

     

    For this I suggest that you use a Clear Slicer button on your report page, be aware if you have any other slicers those will also be cleared.

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

    Hi sr97,

     

    Thank you for reaching out to Microsoft Fabric Community Forum.

     

    Power BI bookmarks cannot dynamically update slicer values — they store static slicer states. However, you can achieve your goal using a dynamic default value logic instead of relying on bookmarks. Here's how you can do it:
    1) Create a dynamic "Latest Date" flag in Power BI: create a calculates column

    IsLatestDate =
    'dim_date'[Date] =
    CALCULATE(
    MAX('dim_date'[Date]),
    ALL('dim_date')
    )

    • Use this logic in a slicer or visual filter:
    • Add the date slicer as usual.
    •  Use a page/filter slicer on IsLatestDate = TRUE.
    • Remove the bookmark that holds the slicer state, and let this logic drive the default.

    2)  Create a measure to capture the latest date

    Latest Date =
    CALCULATE(
    MAX('dim_date'[Date]),
    ALL('dim_date')
    )

    3) When your Excel file is updated and refreshed in Power BI, the MAX(Date) will always return the new latest date no manual action required.

     

    Regards,

    Chaithanya.

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

    Hi sr97 ,

     

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
    If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.


    Regards,

    Chaithanya.

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

    Hi @sr97 ,

     

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
    If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.


    Regards,

    Chaithanya.

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

    Hi @sr97 ,

     

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
    If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.


    Regards,

    Chaithanya.