Forum Discussion

jitpbi's avatar
jitpbi
Icon for Post Patron rankPost Patron
5 years ago

set a default date range in date slicer

 

Hi,

 

I need to set a deafult date range in the slicer where slicer type is between only. Using relative date silcer type is not getting fit into my requirement, so plz dont suggest for relative date.

Is there any possible way to set the yesterday and today date as default range in between type of slicer?

As today is 10/12/2020, so the slicer should take 10/11/2020 and 10/12/2020 for today and tomorrow its default range should be 10/12/2020 and 10/13/2020. the same should be continue forever.

 

Thanks

 

3 Replies

  • jitpbi , I do not think there is way for that.

     

    They only way is workaround to have a slicer on a column like this

     

    Date Type = SWITCH(TRUE(),

    'Date'[Date]=TODAY(),"Today & Yesterday",

    'Date'[Date]=TODAY()-1,"Today & Yesterday"

    ,'Date'[Date]&"")

     

    and select Today & Yesterday on LOV.

    • jitpbi's avatar
      jitpbi
      Icon for Post Patron rankPost Patron

      Hi amitchandak,

       

      I need the slicer like below screenshots, bydefaut it should be for 2 days (today and yesterday) , as in left slicer, and user can also select any date range, as in right side slider, if they needed to change the date:

       

      Thanks

      • Icey's avatar
        Icey
        Icon for Community Support rankCommunity Support

        Hi jitpbi ,

         

        To my knowledge, it is not supported to meet your requirements in Power BI currently.

        You can post your idea on Power BI Ideas. It is a place for customers to provide feedback about Power BI.

         

         

        Best Regards,

        Icey

         

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.