Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Default Date

I have Calculated Dates filter and slicers and It is perfectly working fine.

I even added a TODAY filter that only filters based on today's data.

 

But the problem is that whenever i open the report it keeps the same dates as before (the slices doesnt get updated based on todays date).

 

I want the to set the default dates for the slicer to be for today whenever the dashboard opens.

 

for example:

If the report opens today, then FromDate in the slicer is 1-Jan-2021 & ToDate is 16-Feb-2021

If the dashboard viewed tomorrow then FromDate in the slicer is 1-Jan-2021 & ToDate is 17-Feb-2021.

  • Anonymous 

    @Noor_Rahmeh , There is no way to default. You need to create a flag(new column) like this in the date table and use that as filter

     

    Is This Year = if('Date'[Date]>=date(Year(TODAY()),1,1) && 'Date'[Date]<=TODAY(),"This year",[Date]&"")

     

    check : https://youtu.be/hfn05preQYA

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    You could create a measure as below.

    Measure = IF(SELECTEDVALUE('Table'[date])<=TODAY(),1,0)

    Then add it to visual level filter.

     

     

    Best Regards,

    Jay

  • Anonymous 

    @Noor_Rahmeh , There is no way to default. You need to create a flag(new column) like this in the date table and use that as filter

     

    Is This Year = if('Date'[Date]>=date(Year(TODAY()),1,1) && 'Date'[Date]<=TODAY(),"This year",[Date]&"")

     

    check : https://youtu.be/hfn05preQYA