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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ThomasWeppler
Super User
Super User

Date slicer equal today and all dates before today

Hi Power Bi community

I have a date slicer with all the dates from the starts of the calender table until today.

ThomasWeppler_1-1719996639560.png

However each time I open the report the max date changes to the last date I picked and not today.
So when my end users come back to the report in five weeks the last date it not up to date.
Is there a way to make it so the default date picked is today or the max date in my calender table.

 

All help is greatly appriciated.

 

3 ACCEPTED SOLUTIONS
bhanu_gautam
Super User
Super User

@ThomasWeppler , For this first create a date table

 

Calendar =
ADDCOLUMNS (
CALENDAR (DATE(2020, 1, 1), TODAY()),
"Year", YEAR([Date]),
"Month", MONTH([Date]),
"Day", DAY([Date]),
"MonthName", FORMAT([Date], "MMMM"),
"YearMonth", FORMAT([Date], "YYYY-MM")
)

 

Then create a measure for maximum date

MaxDate = MAX('Calendar'[Date])

 

Then add slicer and use date column from calender table and change setting to use as relative date filter and select as day now you will always get latest date




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

AmiraBedh
Super User
Super User

You need a Calendar table :

Calendar = 
ADDCOLUMNS (
    CALENDAR (DATE (2015, 1, 1), TODAY ()),
    "Year", YEAR([Date]),
    "Month", MONTH([Date]),
    "Day", DAY([Date])
)

 

Then create a measure :

MaxDate = MAX(Calendar[Date])

Another one to set the default the date:

 

IsToday = IF(TODAY() = [MaxDate], 1, 0)

 

and then :

DefaultDate = 
FILTER (
    Calendar,
    Calendar[Date] = TODAY()
)

Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

View solution in original post

Anonymous
Not applicable

Thank you @bhanu_gautam and @bhanu_gautam 

It's good that you provided a date table DAX expression that can get the real-time date.

Hi, @ThomasWeppler 

As Super User says, you need to create a real-time date table (with today). You are experiencing this situation when you automatically default to the date you selected for the last time you open the report every time you reopen the report. For this default behavior, you can choose bookmark as an alternative workaround. When you open the report, use bookmarks to reset your slicer to the maximum date of your date table.

vjianpengmsft_0-1720416519965.png

 

In addition to this, you can enable the following feature when you publish a report to Power BI Service, which resets the slicer options when the end user closes the report:

vjianpengmsft_0-1720416308429.png

When I open the report to change the slicer:

vjianpengmsft_1-1720416358982.png

When I reopen the report, the slicer resets to the latest date:

vjianpengmsft_2-1720416382931.png

 

 

 

Best Regards

Jianpeng Li

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

 

 

 

 

View solution in original post

7 REPLIES 7
Idrissshatila
Super User
Super User

Hello,

 

I made a video to show how to set today's date as default while showing other dates 

https://youtu.be/kVcStgZhnuw?si=__o61_izYQkikbn8

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Anonymous
Not applicable

Thank you @bhanu_gautam and @bhanu_gautam 

It's good that you provided a date table DAX expression that can get the real-time date.

Hi, @ThomasWeppler 

As Super User says, you need to create a real-time date table (with today). You are experiencing this situation when you automatically default to the date you selected for the last time you open the report every time you reopen the report. For this default behavior, you can choose bookmark as an alternative workaround. When you open the report, use bookmarks to reset your slicer to the maximum date of your date table.

vjianpengmsft_0-1720416519965.png

 

In addition to this, you can enable the following feature when you publish a report to Power BI Service, which resets the slicer options when the end user closes the report:

vjianpengmsft_0-1720416308429.png

When I open the report to change the slicer:

vjianpengmsft_1-1720416358982.png

When I reopen the report, the slicer resets to the latest date:

vjianpengmsft_2-1720416382931.png

 

 

 

Best Regards

Jianpeng Li

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

 

 

 

 

AmiraBedh
Super User
Super User

You need a Calendar table :

Calendar = 
ADDCOLUMNS (
    CALENDAR (DATE (2015, 1, 1), TODAY ()),
    "Year", YEAR([Date]),
    "Month", MONTH([Date]),
    "Day", DAY([Date])
)

 

Then create a measure :

MaxDate = MAX(Calendar[Date])

Another one to set the default the date:

 

IsToday = IF(TODAY() = [MaxDate], 1, 0)

 

and then :

DefaultDate = 
FILTER (
    Calendar,
    Calendar[Date] = TODAY()
)

Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Hi @AmiraBedh The problem is that if I add a filter where I set the date = max date then I cannot use the filter for anything since I need to be able to choose multiple dates I just wants the filters default to be the max date. I hope that makes sense.

bhanu_gautam
Super User
Super User

@ThomasWeppler , For this first create a date table

 

Calendar =
ADDCOLUMNS (
CALENDAR (DATE(2020, 1, 1), TODAY()),
"Year", YEAR([Date]),
"Month", MONTH([Date]),
"Day", DAY([Date]),
"MonthName", FORMAT([Date], "MMMM"),
"YearMonth", FORMAT([Date], "YYYY-MM")
)

 

Then create a measure for maximum date

MaxDate = MAX('Calendar'[Date])

 

Then add slicer and use date column from calender table and change setting to use as relative date filter and select as day now you will always get latest date




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thanks for the quick answer @bhanu_gautam.
How do I change the setting to use a relative date filter?

@ThomasWeppler < Select slicer and date column then go to settings

 

bhanu_gautam_0-1720003436906.png

 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors