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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
sp8
Helper II
Helper II

Date slicer not allowing to date entry or slider

I have a date slicer on a field that is set to data type date. The slicer will let me enter a from date but not a to date. It also won't let me use the slider. (I suspect the issues are related.) The little i says "data range not available."

 

I added a filter to the visual to not include blank dates, but that doesn't fix it.

 

Any ideas how to fix this?

 

Slicer:

date slicer.JPG

Format of the field in the slicer:

date format.JPG

 

When I try to click the slider button, it just keeps turning off. 

slider.JPG

 

I even made sure that there are no blank values passed to the slicer.

not blank.JPG

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

Hi @sp8 ,

 

I suggest you create a calendar table in your data model, please refer to https://kohera.be/blog/power-bi/how-to-create-a-date-table-in-power-bi-in-2-simple-steps/, create one to many relationship between your  calendar table and fact table and use data column in calendar table for slicer.

 

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

 

Best Regards,

Dedmon Dai

View solution in original post

2 REPLIES 2
sp8
Helper II
Helper II

@v-deddai1-msft 
 Thanks. That's a nice workaround and technically makes the slider work as a slider.
 
 It would work if I had fixed dates or was in import mode (which is not my situation), but it did give me the direction I needed to solve the issue.
 
Since I'm in Direct Query, I had to make an SQL query to generate the date table or else the import table would be stuck with whatever dates I originally put in since I don't ever do a data refresh.
One note in case somebody else wants to use this: you have to set up a 2-way relationship or else filtering by another field (like customer) won't allow the date slicer to adjust to an appropriate range and you'll end up with a huge reange with no resolution.

v-deddai1-msft
Community Support
Community Support

Hi @sp8 ,

 

I suggest you create a calendar table in your data model, please refer to https://kohera.be/blog/power-bi/how-to-create-a-date-table-in-power-bi-in-2-simple-steps/, create one to many relationship between your  calendar table and fact table and use data column in calendar table for slicer.

 

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

 

Best Regards,

Dedmon Dai

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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