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.
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.
Solved! Go to 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.
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
@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.
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
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
97 | |
75 | |
65 | |
53 |
User | Count |
---|---|
144 | |
103 | |
98 | |
85 | |
64 |