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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

limiting date slicer

Hi,

I have included a date slicer where I can specify the from and to dates.My problem statement as follows:

what ever date i select in the from part the to part will only show date within 90 days and not more than that.how do I implement the logic on power bi dashboard.

 

Thanks!

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous

 

If I understand correctly, you want to first select a from date, and then only the 90 days after the from date display in the slicer for users to select a to date within them. In short, the days between from date and to date should be limited to less than 90 days, right? If so, it seems difficult to realize this in a slicer. Instead, I find an alternative option which will use two date slicers. You may take a try if you have interest in it. Steps are as follows.

 

1. Create a Calendar table.

2. Create a Date From slicer with 'Calendar'[Date] as field. Change the slicer to After mode.

3. Create a Date To slicer with 'Calendar'[Date] as field. Change the slicer to Before mode.

4. Create two measures as below. Put Measure on the Date To visual's filter and set value is 1.

FromDate = MINX(ALLSELECTED('Calendar'[Date]),'Calendar'[Date])
Measure = IF(MAX('Calendar'[Date])>=[FromDate] && MAX('Calendar'[Date])<[FromDate]+90,1,0)

 

111301.jpg

Now you will get the slicers like the following image:

111302.jpg

You can download the PBIX file.

 

Best Regards,

Community Support Team _ Jing Zhang

If this post helps, please consider Accept it as the solution to help other members find it.

View solution in original post

4 REPLIES 4
v-jingzhang
Community Support
Community Support

Hi @Anonymous

 

If I understand correctly, you want to first select a from date, and then only the 90 days after the from date display in the slicer for users to select a to date within them. In short, the days between from date and to date should be limited to less than 90 days, right? If so, it seems difficult to realize this in a slicer. Instead, I find an alternative option which will use two date slicers. You may take a try if you have interest in it. Steps are as follows.

 

1. Create a Calendar table.

2. Create a Date From slicer with 'Calendar'[Date] as field. Change the slicer to After mode.

3. Create a Date To slicer with 'Calendar'[Date] as field. Change the slicer to Before mode.

4. Create two measures as below. Put Measure on the Date To visual's filter and set value is 1.

FromDate = MINX(ALLSELECTED('Calendar'[Date]),'Calendar'[Date])
Measure = IF(MAX('Calendar'[Date])>=[FromDate] && MAX('Calendar'[Date])<[FromDate]+90,1,0)

 

111301.jpg

Now you will get the slicers like the following image:

111302.jpg

You can download the PBIX file.

 

Best Regards,

Community Support Team _ Jing Zhang

If this post helps, please consider Accept it as the solution to help other members find it.

Hello @v-jingzhang,

 

So sorry!

 

I had a similar post and thought the response was in reference to my post.

I did not see the original post.

 

Apologies!

Did I answer your question?
If yes, then please mark my post as a solution!

Thank you,
Vishesh Jain

Proud to be a Super User!



lbendlin
Super User
Super User

If that is your goal, what is the point of having a "to"  part in your slicer?  Use a slicer with a single date value instead.

Hi @lbendlin,

 

So sorry!

 

I had a similar post and thought the response was in reference to my post.

I did not see the original post.

 

Apologies!

Did I answer your question?
If yes, then please mark my post as a solution!

Thank you,
Vishesh Jain

Proud to be a Super User!



Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors