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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
JasonShanks
Frequent Visitor

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 contains an example of the behavior.  Here are the details:

  • Underlying data set has accounts that were opened during the current year and previous years.
  • Relative date filter has been set on the slicer to limit the values to only those within the current year.
  • If any value other than the first date of the relative date range (in this case, 01/01/2022) is selected in the slicer, the slicer works as intended and target visualizations are filtered accordingly.
  • If the first date of the of the relative date range is included in the selection, the filter is removed from target visualizations.

In the example .pbix file, when the date 01/01/2022 is included in the slicer's date range, the earliest date shown on the card is from an account opened in 2020.  When checking to see what filters are applied to the card, the card shows that no filters are applied.  If I change the date range in the slicer from 01/05/2022 through the max date, the earliest date shown on the card is 01/05/2022 (which is expected).  Checking the applied filters confirms that the date range 01/05/2022 through 01/24/2022 is applied to the target card.

 

Link to .pbix file

 

Has anyone else encountered this issue?  If so, were you able to find a work-around?



1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @JasonShanks 

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


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

I found this issue too and Im positive that it is a bug! I was quite confused by this.  How can we report this bug to the Power BI developpers team so that this can be fixed?

KNP
Super User
Super User

@OwenAuger@JasonShanks 

 

I raised an issue here: https://community.powerbi.com/t5/Issues/Date-Slicer-Misleading-Behaviour/idi-p/2302256#M75012 if you'd like to comment and vote.

 

It seems wrong to me. At very least, extremely misleading.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
OwenAuger
Super User
Super User

Hi @JasonShanks 

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


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

Thank you KNP and Owen for your quick responses!  The page-level filter resolved the issue for the current report and we'll treat it as "known behavior" going forward.  I appreciate your help!!

JasonShanks
Frequent Visitor

I was able to get around the issue by applying a page-level filter that mimicked the filter on the selector, so the immediate issue is resolved.  However, it would be great if we could get the selector to work as intended without the page-level filter.

KNP
Super User
Super User

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...

KNP_0-1643160298358.gif

 

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.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.