Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Bug in Relative Date Slicer?

I'm using Power BI Desktop (December 2021) and have noticed weird behavior when using a date slicer that has a relative date filter applied to its source field (open date).  The attached .pbix file c...
  • OwenAuger's avatar
    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:

    1. 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".
    2. 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