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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ADB8335
Regular Visitor

Help with date slicer

I have a need for a date slicer to contain multiple options for date ranges as well as the option to choose a custom date range.  I'd like the user to be able to choose from the options below.  

 

ADB8335_0-1713369284333.png

 

In my model, I have a DateDim table which has relationships to all of the fact tables.  I then have a DateRange table which has all of the ranges listed above and the dates that fall into those ranges.  The Custom date range in that table will have all of the dates for the last 24 months.  The DateRange table has a bi-directional relationship to DateDim.  If a user selects "Last 3 months" it will obviously show the data for the last 3 months and I would like for them to not have the option to specify a date range.  However, if a user selects Custom I'd like them to be able to specify any date range using a date slider (our data is a rolling 24 months).  Is this even possible, or can I only have the "pre defined" ranges and not both the option to choose a "pre defined" range or a custom range.  One issue I have noticed is if I choose a "pre defined" option the date slider does not update.  Or if I choose Custom and choose an end date is prior to "Last 12 months", then the other options in the drop-down are not available until I reset the dates on the date slider.

 

No big deal if this is not possible, and I'm not looking for an ugly workaround to get it to work.  If it's possible, that's great, if not I would just like an answer to take back to the business.

 

Thanks for the help.

1 ACCEPTED SOLUTION
v-huijiey-msft
Community Support
Community Support

Hi @ADB8335 ,

 

It seems you're looking to create a date slicer in Power BI that allows users to select from predefined date ranges as well as a custom date range.

 

You can create a relative date slicer.

 

This feature allows you to apply a time filter to any date column in your data model.

vhuijieymsft_0-1713423968504.png

vhuijieymsft_1-1713423968505.png

 

I think this function is more convenient. You don't need to create a date range table, but you can also select the corresponding date range.

 

For more information about relative date slicers, please see:

Create a relative date slicer or filter in Power BI - Power BI | Microsoft Learn

 

If this method does not solve your needs, maybe you can try uploading your pbix file to me. Please be careful not to log in to your account in Power BI Desktop when uploading the pbix file.

 

If you have any further questions please feel free to contact me.

 

Best Regards,
Yang
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!

View solution in original post

1 REPLY 1
v-huijiey-msft
Community Support
Community Support

Hi @ADB8335 ,

 

It seems you're looking to create a date slicer in Power BI that allows users to select from predefined date ranges as well as a custom date range.

 

You can create a relative date slicer.

 

This feature allows you to apply a time filter to any date column in your data model.

vhuijieymsft_0-1713423968504.png

vhuijieymsft_1-1713423968505.png

 

I think this function is more convenient. You don't need to create a date range table, but you can also select the corresponding date range.

 

For more information about relative date slicers, please see:

Create a relative date slicer or filter in Power BI - Power BI | Microsoft Learn

 

If this method does not solve your needs, maybe you can try uploading your pbix file to me. Please be careful not to log in to your account in Power BI Desktop when uploading the pbix file.

 

If you have any further questions please feel free to contact me.

 

Best Regards,
Yang
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!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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