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
ThaddeusB
Helper I
Helper I

Prevent invalid date selection in slicer

Is there a way to prevent the selection of a date outside the valid range in a date slicer? 

 

In my visualization, a subset of the complete data is selected by default, so it is not immediately obvious what the min & max values are.  If the user selects a new date from the boxes, the pop-up calednar allows select of any date including well after the maximum or well before the minimum.  Of course selecting invalid dates does nothing, but it is not obvious to the user why.

 

I assume this an oversight in the way the slicer works, as I can't imagine it always lets you select any value whatsoever by design.  But thought I'd ask to see if there is a workaround.

1 ACCEPTED SOLUTION

Hi @ThaddeusB - indeed, I had never noticed that. That does appear to be a bug.

 

You can try this link: https://community.powerbi.com/t5/Issues/idb-p/Issues and report it there. You might get some better answers or some assistance from support directly.

View solution in original post

6 REPLIES 6
v-danhe-msft
Employee
Employee

Hi @ThaddeusB,

From your description, I could not figure out the sentense "prevent the selection of a date outside the valid range in a date slicer", how could you select a date outside the range of a date slicer? Could you please post more detail information?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-danhe-msft  Sure, my calendar table has dates from 7/1/2015-9/30/2018.  I have a slicer visualization for this table. On my slicer visualization I have the slider turned off so it is just the date input boxes.  These boxes allow the user to select any date whatsoever.  It is not at all obvious to the user what the valid date range.  I would like either 1) the calendar to not sure invalid dates or 2) the date to automatically change back to the minimum date when an out of range date is selected.  Neither seems possible.

 

temp.png

I don't know how your date table is currently built, but a date table built with CALENDARAUTO() will only have dates for years that span your data (so if your data is 7/1/2017-11/30/18, CALENDARAUTO() would have dates 1/1/17-12/31/18).  You could also use the CALENDAR() function to build the table and specify MIN(fact table date) and MAX(fact table date) so you only get exactly those dates (warning on this method is that some time intelligence functions may not work properly without a full year's worth of data in each year)

 

You could also potentially use the date on your fact table as the field for the slicer (as opposed to the field in your date table), but that will depend on your model and whether or not you can/need to do a bi-directional crossfilter.

 

Hope this helps

David

@dedelman_clng  My calendar table is generated as you suggest via 

Calendar = CALENDAR (DATE(2015, 7, 1), DATE(2018, 09, 30))
 
The slider portion of the visualization (if turned on) only shows that range.  The problem is the sclier input boxes allow any date to be selected anyway.  I believe this is a bug/oversight in the design of the visual, but maybe there is a fix I am missing?

Hi @ThaddeusB - indeed, I had never noticed that. That does appear to be a bug.

 

You can try this link: https://community.powerbi.com/t5/Issues/idb-p/Issues and report it there. You might get some better answers or some assistance from support directly.

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.