Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Setting a default date

Hi,

 

I have a table with columns:

statusdate, CustomerNo, Price

 

In my report i have slicer statusdate and a table with CustomerNo, Price

 

The slicer has between date

I want to default the slicer date to last Friday as the end date and 4 months from today as the start date as an example.

Example: for today's date (9/10/2020)

 

roopesh_0-1599745643415.png

 

This has to happen every time we open the report.

Please let me know if there is a dax code i can use.

 

 

 

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , I doubt there something can be done for a range , you can create some filter like this a control the complete range

 

This example for month , you have get Range of your choice

Month Type = Switch( True(),
eomonth(Date[Date],0) = eomonth(Today(),0) ,"Current Month" , //This Month
eomonth(Date[Date],0) < eomonth(Today(),0) && ,"Previous Month" , //last Month
eomonth(Date[Date],0) > eomonth(Today(),0) && ,"Next Month" , //last Month
[Month Year]
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Community Champion
Community Champion

@Anonymous So sometimes you would do this by creating a column that calculates to something like "Last Friday" and "Not Last Friday" but Not sure this will work on range. maybe a relative date slicer? 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.