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
karthik-sg-25
Regular Visitor

Dynamically Limit End Date of a Power BI Slicer Based on the Start Date

Hi all,

I have a requirement for a "Between" date slicer in Power BI. When a user selects a start date, the end date needs to be restricted to a maximum of one year from the selected start date. For example, if the start date is set to 15/1/2024, the user should only be able to select an end date up to 15/1/2025.

The goal is to prevent users from selecting a date range greater than one year. This is an urgent request, and any guidance would be greatly appreciated.

karthiksg25_0-1751800229642.png

10 REPLIES 10
v-nmadadi-msft
Community Support
Community Support

Hi @karthik-sg-25 

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.

danextian
Super User
Super User

Hi @karthik-sg-25 

Right now, there's no way to make a Between date slicer dynamically limit the end date based on the selected start date. You can mimic the behavior with a workaround, but it won’t be perfect — and you’ll need more than just a slicer to pull it off.

If you're aiming for a truly dynamic start and end pairing, you'll need to ditch the Between slicer and build a custom setup. One way is to use two separate slicers, or create a table with a base date and another column that lists all dates from that base date up to 12 months later — about 365 rows per base date.

You can see a sample in the attached file. To make it work, you’ll need either a many-to-many single-direction relationship or a one-to-many relationship set to bidirectional, depending on your model.

danextian_0-1751861284552.gif

 

 

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @danextian,

Thanks for your response. Let me clarify the requirement with some background.

I'm using Direct Query in my Power BI report, so performance is a key concern. To avoid performance issues, I need to restrict users from selecting a date range of more than one year in the "Between" date slicer.

Here’s what I want to achieve:
When a From Date is selected (e.g., 01/01/2024), the To Date should not allow selection beyond one year from that date (i.e., 01/01/2025).

For example:

  • If the user selects 01/01/2024 as the start date, they should only be able to choose dates between 01/01/2024 and 01/01/2025.
  • If the current To Date is already beyond the one-year limit, it should automatically reset to exactly one year from the From Date.
  • If the current date range is within one year, then no change is needed—the user can proceed.

The goal is to dynamically restrict or reset the To Date based on the selected From Date to ensure the selected range stays within one year.

 Hi @karthik-sg-25 

As what I and other users have already mentioned, what you're trying to achieve isn't currently possible. You will need to use two slicers - the first  one dynamically restricts the second one as in my example in the attached pbix in my initial reponse.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @danextian,

Never ever did I wonder it had a workaround thanks for this. But I have a minor issue in this I downloaded your pbix file and was doing testing and found that

 

1. One year range works based on selected date.

karthiksg25_0-1752515127460.png

2. But when I select the to Date and during change I notice the from date is behaving weirdly

karthiksg25_1-1752515339389.png

 

3. Below you can see it just that weird date was shown during selection, but back to proper date after selecting To Date

karthiksg25_2-1752515453271.png

 

 

Hi @karthik-sg-25  ,


Since this is a workaround, there may be some limitations; however, the core functionality you're aiming to achieve restricting users from selecting a date range longer than one year to avoid performance issues should still be effectively supported.

If you encounter any issues with the slicer, simply click Clear selection and reselect the dates this should help bypass the problem.

 

vnmadadimsft_0-1752639105604.png

 



I hope this information helps. Please do let us know if you have any further queries.
Thank you

MasonMA
Impactful Individual
Impactful Individual

Hi @karthik-sg-25  

 

In your scenario, it wouldn't be possible to do it in one Date slicer. It might be possible by creating two separate Date slicers and to have one restrict the date range of the other one by using DAX. 

 

However i'd suggest you simply use one Date slicer to dynamically limit the data in your visuals to the past year. For this @Ashish_Mathur just provided this solution in another post and i'd recommend you take a look there. 

 

https://community.fabric.microsoft.com/t5/Desktop/Selecting-single-date-as-calendar-on-slicer/m-p/47...

karthik-sg-25
Regular Visitor

@rohit1991, I am assuming you have copy pasted an AI Solution but yeah have already tried this and it does not work.

rohit1991
Super User
Super User

Hi @karthik-sg-25,
Power BI’s standard “Between” date slicer can’t dynamically limit the End Date based on the Start Date, but you can work around this by using two disconnected date tables—one for the start date, one for the end date. Add two slicers and use a DAX measure to filter the End Date options so users can only pick an end date up to one year after the chosen start date. Then, create a second DAX measure to filter your visuals, ensuring data only shows for valid ranges within that year.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

I am assuming you have copy pasted an AI Solution but yeah it does not work.

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.