Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago

Date Slicer Extra Day

I have Power BI Desktop (Version: 2.41.4581.361 64-bit (November 2016) connected to SQL Server 2016 via direct query.

 

I have a DateDimension with a field set as Data Type: Date and is stored in the database as a Date type.

 

When I use the Date Slicer an extra day is always added to the end date.  I've profiled the data being sent to SQL server and it looks like a day is being added.

 

Screen Shot 1
Screen Shot 2

7 Replies

  • Hi Anonymous,

     

    Hover on top right of slicers, you could switch to List or dropdown. With this option, the generated query will use one date with equal operator

    • Anonymous's avatar
      Anonymous
      Not applicable

      I know I can do that but I need a date range that works according to what's on the screen.  The default setting says between.  By the way the date range works correctly when the data is set to import instead of direct query.

      • tringuyenminh92's avatar
        tringuyenminh92
        Icon for Memorable Member rankMemorable Member

        Hi Anonymous,

         

        I'm sorry but It's confusing now. what's your expectation or concern?  What is wrong with slicer behavior or query execution?

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Anonymous,

     

    I have tested this scenario in Version: 2.41.4581.361 64-bit (November 2016), I could reproduce your problem. It looks like an issue about date range slicer when selecting "Between" option. It will automatically add one day to the end date. 

     

    Also, I find that this issue only occurs in direct query mode. In import mode, the date range slicer works fine to filter data.

     

    Someone else coming across the same problem has submitted this issue at this page, you can click to vote it up.

     

    Thanks,
    Yuliana Gu

    • Anonymous's avatar
      Anonymous
      Not applicable

      Issue has been addressed with January release.  The direct query SQL is now generating a '<' (rather than '<=') on the extra day added to date slicer