Forum Discussion

SudhanshuD4512's avatar
SudhanshuD4512
Frequent Visitor
8 months ago
Solved

Default Date for date slicer

I'm working with a date range slicer in Power BI that is set to "Between" mode to allow users to select both a start and end date. I have a fact table from which i want to pull the date of sales order.

I would like the slicer to automatically default to display the date range from the start of the current month up to last data refresh date. However, I still want users to have the ability to manually change the date range if they wish.
I have tried with relative date filter but it doesn't work in my case

Here’s a summary of my setup:

  • Slicer Type: Date range slicer in "Between" mode

  • Default Range: Start of the current month (e.g., 01/12/2025) to latest data refresh date(e.g., 4/12/2025)

  • User Control: Users should still be able to adjust the date range manually.

How can I achieve this behavior for my Power BI date range slicer? 

  • Hi,

     

    Yor can do this in Power BI but but not directly using the slicer default settings, because Power BI still does not support dynamic default values for “Between” slicers.

     

    You can try below step to trublshoot this issue:

     

    • Set your date slicer to Between mode.

    • Manually set the slicer to:

      • Start of current month

      • Last data refresh date

    • Go to View → Bookmarks

    • Create a bookmark:

      • Name it: Default Date Range

      • Under bookmark settings:
        ✔ Data
        ✔ Display
        ✔ Current page

    • Add a button labeled "Reset Date Range"

    • Assign the bookmark to the button.

     

    when the report open slicer stays at bookmarks defaulf unless the previouly cahnged slier by you and pwoer bi saved it for session. You can adust the slicer whenever needed.

    They can always click Reset Date Range to return to “Start of month → Last refresh date”.

    OR

    Below is the sloved community solution please try it:

    Setting a default value for 'between' date slicer

    Solved: Setting a default value for 'between' date slicer - Microsoft Fabric Community

     

     

    I hope this helps!
    If you found this answer helpful:

    Mark it as the solution to help others find it faster.
    Give it a kudo to show your appreciation!
    Thank you for being an awesome community member!

  • Hello SudhanshuD4512 ,

     

    you can use bookmarks to achieve the same.

    1. Create a bookmark with default values ( I think you have already or can create using suggested approach)

    2. Create another bookmark for custom selection ( to choose from and to ). 

    3. Add an information button to provide user information ( optional)

     

    This will give your user control of using default or custom dates.

     

    I hope this helps.

     

    Did I answer your query ? Mark this as solution if this helps.

     

    Warm Regards,

     

9 Replies

  • 123abc's avatar
    123abc
    Community Champion

    Hi,

     

    Yor can do this in Power BI but but not directly using the slicer default settings, because Power BI still does not support dynamic default values for “Between” slicers.

     

    You can try below step to trublshoot this issue:

     

    • Set your date slicer to Between mode.

    • Manually set the slicer to:

      • Start of current month

      • Last data refresh date

    • Go to View → Bookmarks

    • Create a bookmark:

      • Name it: Default Date Range

      • Under bookmark settings:
        ✔ Data
        ✔ Display
        ✔ Current page

    • Add a button labeled "Reset Date Range"

    • Assign the bookmark to the button.

     

    when the report open slicer stays at bookmarks defaulf unless the previouly cahnged slier by you and pwoer bi saved it for session. You can adust the slicer whenever needed.

    They can always click Reset Date Range to return to “Start of month → Last refresh date”.

    OR

    Below is the sloved community solution please try it:

    Setting a default value for 'between' date slicer

    Solved: Setting a default value for 'between' date slicer - Microsoft Fabric Community

     

     

    I hope this helps!
    If you found this answer helpful:

    Mark it as the solution to help others find it faster.
    Give it a kudo to show your appreciation!
    Thank you for being an awesome community member!

  • Hi SudhanshuD4512,

     

    Power BI does not directly support setting a dynamic default for a slicer while still letting users change it. However there is a workaround to allow users to select dates manually what they wish by using bookmarks. 

    1. Create a calculated column as below

    DefaultRange = 
    Var StartDate = DATE(YEAR(TODAY()), MONTH(TODAY()), 1)
    Var EndDate = TODAY()
    Var Result =  
    IF(Calendar[Date] >= StartDate && Calendar[Date] <= EndDate, Calendar[Date])
    RETURN
    Result

    2. Use DefaulRange as date slicer(between mode) 

    3.Create your visuals as per the deafult date range and setup a book mark button for DefaultDateRange
    4.Again create a another slicer by using your original date column which will provide entire date range selection for users. 

    5.Again re-create your visuals with respect to orginal date column. and setup a book mark button for ManualDateRange.

    Note:
    If you want to select your dates between 1/12/2025 to 4/12/2205 that will possible. 

    Please let me know if you have any questions. 

    Thanks,
    If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.

  • Hello SudhanshuD4512 ,

     

    you can use bookmarks to achieve the same.

    1. Create a bookmark with default values ( I think you have already or can create using suggested approach)

    2. Create another bookmark for custom selection ( to choose from and to ). 

    3. Add an information button to provide user information ( optional)

     

    This will give your user control of using default or custom dates.

     

    I hope this helps.

     

    Did I answer your query ? Mark this as solution if this helps.

     

    Warm Regards,

     

  • Hi SudhanshuD4512,

    Apart from the solution provided in the thread, couple of solutions I can think of are:

    1. The simplest way would be to take between slicer, erase the selections of slicer by clicking on erase icon at top right of slicer and then manually selecting start date to 1st of the month. With each data refresh, your start date will remain same while end end will take max of date. Only con - you will have to manually select 1st of month whenever any month starts.

     

    2. Relative date slicer should ideally work. Not sure why it isn't working for you but ideally it should work seemlessly to get data of current month only. 

     

     

    Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

    Proud To Be a Super User !!!
    LinkedIn

  • SudhanshuD4512 

     

    StartOfMonth = DATE(YEAR(TODAY()), MONTH(TODAY()), 1)

    LatestDataDate = MAX('FactTable'[SalesOrderDate])

     

    Create a date range table for filtering using these as initial values.

    Use Bookmarks to capture slicer with defaults applied on report load.

    Deploy slicer on Date with mode "Between".

    Users can still manually adjust after default is set.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi SudhanshuD4512,

     

    Thank you for reaching out to the Microsoft Fabric Forum Community, and special thanks to danextian , Anand24 , Kedar_Pande and divyed  for prompt and helpful responses.

    Just following up to see if the Response provided by community members were helpful in addressing the issue. if the issue still persists Feel free to reach out if you need any further clarification or assistance.

     

    Best regards,
    Prasanna Kumar

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi SudhanshuD4512,

     

    Just following up to see if the Response provided by community members were helpful in addressing the issue. if the issue still persists Feel free to reach out if you need any further clarification or assistance.

     

    Best regards,
    Prasanna Kumar