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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Date range max date should be defaulted to today's date.

roopesh_1-1599844880156.png

Every time I open the report I need the max range to default to today's date.

Can you please let me know how I can achieve this?

 

Thank you

Roopesh

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , I doubt you can do much on range.

 

Option 1

use a relative date filter on page <=today (page level filter) -- last 5 or 10 years including today

 

Option 2

Say we create a measure like this and use that visual filter to slicer then slicer will show fewer dates but the filter will not apply

Before Today = if('Date'[Date]<date(2019,12,31),"Yes","No")

 

So what need do is, you need have this as Slicer on-page  and visual level filter too for Date slicer

 

Option 3

Other slicer options are

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

 

 

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]
)

 

Month Type = Switch( True(),
year([Date]) = year(Today())-1,"Last Year" ,
year([Date])= year(Today()),"This Year" ,
Format([Date],"YYYY")
)

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Greg_Deckler
Super User
Super User

@Anonymous Use a relative date filter or you will need to create a column like:

Column = IF([Date]=TODAY(),"Today","Rest")

 

Then you would need a slicer for that. But that will create havod for a range slicer unless you are tricky about it and have it calculate out the default range that you want when assigning "Today". There's really no good, clean way.

 



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.