cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mathivananj
Frequent Visitor

How to set Yesterdays date as default value in date slicer?

Hi all , 
i have a date slicer in my report , i want to show the yesterday date as default value when we land on the report.
Can you help me how this can be done.

 

I am using direct query metho

1 ACCEPTED SOLUTION

@mathivananj Right, so you would set the slicer to "Yesterday" and save it. Publish it, now Yesterday should be the default for the report.


@ me in replies or I'll lose your thread!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Learn Power BI 2nd Edition

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @mathivananj,

Did Greg's suggestions help with your scenario? if that is the case, you can consider Kudo or accept his suggestions to help others who faced similar requirements.

If that also doesn't help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Greg_Deckler
Super User
Super User

@mathivananj So, a lot of people solve this by adding a column like:

 

 

Column = 
  VAR __Yesterday = TODAY() - 1
RETURN
  IF([Date] = __Yesterday,"Yesterday",[Date] & "")

 

 

You use this column in your slicer, set it to Yesterday, save and publish. 


@ me in replies or I'll lose your thread!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Learn Power BI 2nd Edition

Hi @Greg_Deckler ,
Thanks for replying this is working but i have to show the yesterday's date when we land on the report.

@mathivananj Right, so you would set the slicer to "Yesterday" and save it. Publish it, now Yesterday should be the default for the report.


@ me in replies or I'll lose your thread!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Learn Power BI 2nd Edition

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors