Forum Discussion
Bug in Relative Date Slicer?
- 4 years ago
Hi Anonymous
At the very least, I would certainly say this is confusing behaviour.
Two observations that explain what's going on:
- When a date slicer is configured with a sliding date selection bar ("Between", "Before", "After") then, regardless of the date range available for selection on the slicer, dragging either the lower-bound to the far left, or the upper-bound to the far right is treated specially and interpreted as "unbounded".
- Applying a visual-level filter to a slicer filters the date range available for selection on the slicer (intersected with the range that exists in the date column), but doesn't filter any other visuals.
Putting these two points together:
- Since you have a visual-level filter on the slicer set to "in this year", the range available for selection is dates in 2022, intersected with the range of OpenDate dates, i.e. 1-Jan-22 to 24-Jan-22.
- With the lower-bound selector at the far left (1-Jan-22), no lower-bound date filter is applied, so other visuals include values of OpenDate earlier than 1-Jan-22.
Suggested workaround:
I would suggest removing the visual-level filter on the slicer, and creating an equivalent page-level filter. This would filter both the range available for selection on the slicer and other visuals on the page. Selecting 1-Jan-22 as the lower-bound would then give an intuitive result.
Alternatively, if you didn't want every visual on the page filtered, you would have to either set individual visual-level filters, or create a hidden slicer set to "in this year" with interaction set just for the visuals you need to filter.
Regards,
Owen
I haven't come across it. I did some testing with your PBIX to see if there was a fix/workaround. All I essentially did was break it more.
This was before I messed with it...
As you can see, if you enter the date from the box instead of with the slider, it works.
I thought, maybe because it was date/time and missing some date values that it may have been causing an issue, so, I created a basic date table, added a date only column to the original table and created a relationship.
Then I used the Date from the newly created date table in the slicer. This caused BOTH selection methods (slider and picker) to stop working.
I would say it is definitely a bug.