Forum Discussion

ringovski's avatar
ringovski
Icon for Helper II rankHelper II
4 years ago
Solved

Date Slicer Default

Hi All,

I have a regular date silcer with single select enabled and date table but the client is asking for it to defualt to yesterday as the report is refeshed daily with yesterdays data. They don't want to use the relative option becuase it's not viewable as a calendar.

 

Any assistance would be appreaicated, Is there a way to do this?

 

Thanks

  • ringovski , Power Bi do not support any funtion for that.

    You need to create a column with yesterdat value and use that

     

    example - This has date along with with yesterday, today

     

    Date Type =
    SWITCH(TRUE(),
    'Date'[Date] = TODAY(), "Today",
    'Date'[Date] = TODAY() -1 , "Yesterday",
    'Date'[Date] = TODAY() +1 , "Tomorrow",
    [Date]& "")

     

     

    You can save this on yesterday . also you can sort this on date column

     

    Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA

1 Reply

  • ringovski , Power Bi do not support any funtion for that.

    You need to create a column with yesterdat value and use that

     

    example - This has date along with with yesterday, today

     

    Date Type =
    SWITCH(TRUE(),
    'Date'[Date] = TODAY(), "Today",
    'Date'[Date] = TODAY() -1 , "Yesterday",
    'Date'[Date] = TODAY() +1 , "Tomorrow",
    [Date]& "")

     

     

    You can save this on yesterday . also you can sort this on date column

     

    Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA