Forum Discussion

rfontaine's avatar
rfontaine
Advocate I
6 years ago

Relative Date Filter for Yesterday Not Working

I've read through the posts on relative date filtering that I could find, but I'm still stuck on how to get this to work.  I am trying to set a filter on a Date slicer that will always show yesterday's date.  Yesterday (March 25) I added a Date slicer to my report with the following visual-level filter settings:

 

 

 

 

 

 

 

 

 

 

 

The filter and slicer correctly showed the date for yesterday (March 24).  However, today (March 26) when I open the report both in Power BI Desktop and the Power BI Service, the slicer is still filtered on March 24 (2 days ago) instead of March 25 (1 day ago/yesterday).  And what's more confusing is that when I open the Filter Pane, the visual-level filter shows that it is set to March 25.

 

 

 

 

 

 

 

 

 

 

 

 

 

If I select the Date slicer dropdown, I see both March 24 and March 25 dates, even though it should only display 1 day as per the Filter Pane settings.

 

 

 

 

 

 

 

 

 

 

 

 

When I manually select March 25, the option for March 24 disappears.

 

 

I was hoping that the Date filter would automatically be set to yesterday's date instead of needing to be manually selected, since I want to setup scheduled daily distribution of the report to end users.  Any ideas what I am missing, or is this how the relative date filtering is supposed to work?  Would a page filter be a better option?

4 Replies

  • v-alq-msft's avatar
    v-alq-msft
    Community Support

    Hi, rfontaine 

     

    Based on my research, It is the issue about selectable values and selected values of a slicer. Actually, slicer selectable values change with context, but selected values can't change automatically. When it comes to 'Today', the selected date of yesterday will still exists because it can't change automatically. However, the selectable date is changed as today and it appears in the list. I think it is a normal phenomenon.

     

    Best Regards

    Allan

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • rfontaine's avatar
      rfontaine
      Advocate I

      v-alq-msft Allan, thanks for the reply.  That does seem to be what's happening in my situation.  I changed the filter to page-level instead and it actually seems to be working.  This morning (March 27) when I checked the report the date was set to March 26.  So, at least I have a workaround by not using the visual slicer.

    • rfontaine's avatar
      rfontaine
      Advocate I

      amitchandak thank you for the reply.  Since the issue is occuring in Power BI Desktop I don't think it is caused by a time zone difference.  I am in Pacific time zone (-8 UTC) and on the Power BI Service I do see that the date advances 8 hours earlier than expected, but that is different from what I'm experiencing here.  My issue is that the slicer visual still shows the date from 2 days previous after moving on to the next day, and it shows 2 dates instead of 1 date as per the visual filter setting.  I appreciate the suggestion though.