Forum Discussion

kormosb's avatar
kormosb
Helper III
6 years ago
Solved

Dynamic date range slicer

Hi,

 

I am having problem with setting the date range slicer dynamic.

That's the slicer below:

 

My Power BI report is refreshed every day once, so I simple want to make the date slicer dynamic, that it changes every day to the next day, like: 2020.01.01 - 2020.02.22, then the day after 2020.01.01 - 2020.02.23.
 
I have tried to make a calculated column in my date table, like below:
Open/closed =
IF(
'Date table'[Date]<=TODAY()
;"Closed";
"Open"
)
 
I tried to use that calculated column to add to visualize level filter (show only "closed" dates), but it doesn't work.
 
Is there any workaround for this?
 
Thanks guys for the help.
 
Ben

7 Replies

  • VasTg's avatar
    VasTg
    Memorable Member

    kormosb 

     

    Ben,

     

    By default(Between option), the end date is updated dynamically based on the dates available in your Date dimension unless you choose a specific date.

     

    If it helps, mark it as a solution

    Kudos are nice too.

    • Gangadhar's avatar
      Gangadhar
      Frequent Visitor

      Hi,

      I want to restrict my date slicer selected start to end date should be 30 days dynamically, can you help me on this issue.
      example : i have selected 15st august 2022 end date should be 13 th August 2022.

  • I found an article which talks about a workaround for this problem. I think this is by far the best way to address this particulat issue.

     

    To summarize the solution, use a combination of a "Special Dates" table which is similar to relative date slicer, but with an additional value to choose "custom". Upon choosing "custom", a bookmark will appear which allows you to choose the "Date Range".

     

    Below a demo GIF extracted from the article mentioned above.

     

     

  • Hi kormosb 

     

    Were you able to achieve this? If yes, can you tell me how you did it?

     

    Best Regards

    Rosh