Forum Discussion

Astorre72's avatar
Astorre72
Frequent Visitor
6 years ago
Solved

Set a dynamic default value for date filter

Hi guys!

 

I have a simple problem:

I have a report with multiple filters, that filters a relatively big dataset. The underlying dataset is constantly refreshes (as more data goes into the underlying SQL table). One of the filters is a date filter, which determines a day - only data that have this date (in one of the columns in the SQL table) will be visualized in the report.

How can I set the default value of this date filter to be always the biggest date? So if the consumer of the report opens the report he/she sees information of the newest day?

 

It seems like an easy and simple task... but I cannot solve this.

 

I already tried relative filter on the filter, but in this case the filter loses its feature - because it will only display the biggest date. Naturally I dont want that.

 

Thanks in advance!

  • Hi, Astorre72 

    Current power bi doesn’t  support you set up default value on slicer.

    However, here is a workaround you can take a try.

    You can create  a new column (sort by date column) to replace the date fileld in slicer:

     

     

    SlicerDate = IF('Table'[Date]=TODAY(),"last date",'Table'[Date]&"")

     

     

     

    sample pbix attached

    For more details,please  refer to this post .

     

    BTY,you can vote below idea  and add comments to  to help improve slicer.

    Default Selected Slicer or Tile-By Value Configuration

     

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

     

2 Replies

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

    Hi, Astorre72 

    Current power bi doesn’t  support you set up default value on slicer.

    However, here is a workaround you can take a try.

    You can create  a new column (sort by date column) to replace the date fileld in slicer:

     

     

    SlicerDate = IF('Table'[Date]=TODAY(),"last date",'Table'[Date]&"")

     

     

     

    sample pbix attached

    For more details,please  refer to this post .

     

    BTY,you can vote below idea  and add comments to  to help improve slicer.

    Default Selected Slicer or Tile-By Value Configuration

     

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

     

    • Astorre72's avatar
      Astorre72
      Frequent Visitor

      Hi, v-easonf-msft 

       

      Thanks for your reply! Your solution is technically working, and fulfills almost all of the requirements. But unfortunately it slows down my reports, because my underlying dataset is huge (~100 million rows from SQL - I use direct query to connect to the data source).

       

      Is there any faster way to get the same result?

       

      Thanks!