Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Puja_Kumari25
Helper III
Helper III

Date slicer with default date range like 12 month and user can also select own date range

Hi,

 

We need to implement a Date slicer in which by default date range is selected like 18 months from today and the user can also choose the date range according to their need. The date slicer has the between setting.

 

When the report is opened, by default 18 months of data will be displayed and the user can use the date slicer to select data according to their requirement. data will be shown with the updated date range value of the date slicer.

 

I would greatly appreciate your help.

 

 

 

 

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Puja_Kumari25 ,

 

Here you may need to use a custom visual called a pre-selected slicer:

vcgaomsft_1-1724640741871.png

You'll also need a bookmark that clears the date pre-screening and binds it to the button:

vcgaomsft_0-1724640717109.png

I made a simple demo, hope it helps.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Hi @Puja_Kumari25 ,

 

Here you may need to use a custom visual called a pre-selected slicer:

vcgaomsft_1-1724640741871.png

You'll also need a bookmark that clears the date pre-screening and binds it to the button:

vcgaomsft_0-1724640717109.png

I made a simple demo, hope it helps.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Hi, 

The solution is working,

Thanks for your help and support.

Hi Cgao, I am implementing this solution but I found once more that the challenge date slice is not filtering based on the pickup slicer. How to resolve it.

Anonymous
Not applicable

Hi @Puja_Kumari25 ,

 

1. When first turned on, the slicer will use the pre-selected slicer settings (from today to the next 18 months)

2. When users need to change the between slicer, they need to clear the pre-selected slicer with a click of the button before proceeding to the next step.

vcgaomsft_0-1724654619098.png

At this point the dates in the between slicer will change to all dates:

vcgaomsft_1-1724654944714.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Our issue is that the date slicer is not syncing with the pre-selected slicer. It shows the min and max days form calender. 

Puja_Kumari25_0-1724655419681.png

 

Anonymous
Not applicable

Hi @Puja_Kumari25 ,

 

Got it. Please check the interaction of the preselect slicer with other visuals to make sure it filters to other visuals.

vcgaomsft_0-1724656443937.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Resolved this by advance option of sync slicer

ahadkarimi
Solution Specialist
Solution Specialist

Hi @Puja_Kumari25, give this a try, and if you encounter any issues, let me know.
create a date table:

 

DateTable = 
ADDCOLUMNS (
    CALENDAR (DATE(2010,1,1), DATE(2030,12,31)),
    "Year", YEAR([Date]),
    "Month", MONTH([Date]),
    "MonthName", FORMAT([Date], "MMMM"),
    "Quarter", QUARTER([Date]),
    "YearMonth", FORMAT([Date], "YYYY-MM")
)

 

Measure:

 

 

IsInDefaultDateRange = 
IF (
    'DateTable'[Date] >= EDATE(TODAY(), -18) && 
    'DateTable'[Date] <= TODAY(), 
    1, 
    0
)

 

 

Did I answer your question?  If so, please mark my post as the solution!✔️
Your Kudos are much appreciated!  Proud to be a Responsive Resident!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.