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

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

Reply
Anonymous
Not applicable

Date slicer max 30 days but user can switch between dates

Hi is there any way that we can use date slicer on report to allow for the user to select any range of data but only a maximum of 30 days at once?

 

For example if the user selected April 1 then the system would allow for them to select up to April 30.  If they selected January 1 then they could select the end range up to January 30 but user can change date within specified dates.

 

As i'm new to this any help will be thankfull.

4 REPLIES 4
danextian
Super User
Super User

Hi @Anonymous ,

For your use case, what I can think of is to use another table that has another  column of 0-29 days from a date.  This table can be created either in Power Query or DAX and will have a many to many relationship with the actual Dates table, the former filtering the latter.  The relationship will look like this:

danextian_0-1653610087404.png

And this is the result:

danextian_2-1653610160266.png

And here's the sample PBIX: https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-many-to-many-relationships 

 

For considerations and limitations related to using a many-to-many cardinality, please refer to this: https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-many-to-many-relationships 

 





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.
Anonymous
Not applicable

Hi @danextian , thanks for reply but can you tell how can we read the selected start value, also only number of days are fixed(30 days) not the month.

For example if the user selected April 2 then the system would allow for them to select up to May 3.

amitchandak
Super User
Super User

@Anonymous , If you can use a relative date slicer.

Or you can use the rolling formula 

Rolling 30 = CALCULATE(Average(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),30,DAY))

 

In case you need to display 30 days

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak , thanks for update, but is it possible that user selects only start date and end date will updated automatically . 

Shubham_Yadav_0-1653553517164.png

 

For example if the user selected April 1 then the system would allow for them to select up to April 30.  If they selected January 1 then they could select the end range up to January 30 but user can change date within specified dates.

 

Thanks

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.