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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Default Date

I have Calculated Dates filter and slicers and It is perfectly working fine.

I even added a TODAY filter that only filters based on today's data.

 

But the problem is that whenever i open the report it keeps the same dates as before (the slices doesnt get updated based on todays date).

 

I want the to set the default dates for the slicer to be for today whenever the dashboard opens.

 

for example:

If the report opens today, then FromDate in the slicer is 1-Jan-2021 & ToDate is 16-Feb-2021

If the dashboard viewed tomorrow then FromDate in the slicer is 1-Jan-2021 & ToDate is 17-Feb-2021.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous 

@Noor_Rahmeh , There is no way to default. You need to create a flag(new column) like this in the date table and use that as filter

 

Is This Year = if('Date'[Date]>=date(Year(TODAY()),1,1) && 'Date'[Date]<=TODAY(),"This year",[Date]&"")

 

check : https://youtu.be/hfn05preQYA

View solution in original post

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could create a measure as below.

Measure = IF(SELECTEDVALUE('Table'[date])<=TODAY(),1,0)

Then add it to visual level filter.

 4.PNG

5.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
amitchandak
Super User
Super User

@Anonymous 

@Noor_Rahmeh , There is no way to default. You need to create a flag(new column) like this in the date table and use that as filter

 

Is This Year = if('Date'[Date]>=date(Year(TODAY()),1,1) && 'Date'[Date]<=TODAY(),"This year",[Date]&"")

 

check : https://youtu.be/hfn05preQYA

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.