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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
a_dika
New Member

set the date slicer so it always updates to today's date

a_dika_0-1721098834604.png

Hi,

 

on the Power BI dashboard, I have created a date table that includes dates starting from 1/1/2000 - 12/31/2050.

Here is the DAX that I have created:
DateTable =
VAR StartDate = DATE(2000, 1, 1) // Adjust the start date as needed
VAR EndDate = DATE(2050, 12, 31) // Adjust the end date as needed
RETURN
ADDCOLUMNS(
CALENDAR(StartDate, EndDate),
"DateAsInteger", FORMAT( [Date], "YYYYMMDD" ),
"Year", YEAR( [Date] ),
"MonthNumber", MONTH( [Date] ),
"MonthName", FORMAT ( [Date], "MMMM" ),
"Day", DAY ( [Date] ),
"CheckTodaysDate", IF([Date] = TODAY(), 1, 0) // New column to identify if the date is after today
)

I put "Date" into the slicer and selected the after option so that the date displayed is 1/1/2000. I filtered the "Date Slicer" using "CheckTodaysDate" and it will filter to the current date. But I can't select a date other than today's date.

 

Is there any way to make the date in the "Date Slicer" display today's date, but it will filter data from the first date to today's date and I can still select dates other than today's date?

1 ACCEPTED SOLUTION
cath1ynn
Resolver II
Resolver II

Pretty easy actually. You just change your "CheckTodaysDate" to the below and you should be able to select dates other than today and the To in the Date filter should always show today.

 

IF([Date] <= TODAY(), 1, 0)

 Before applying filter:

cath1ynn_0-1721105855744.png

After applying filter:

cath1ynn_1-1721105866792.png

 

View solution in original post

3 REPLIES 3
Idrissshatila
Super User
Super User

Hello 

 

Leaving this here as it may help people searching
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!




cath1ynn
Resolver II
Resolver II

Pretty easy actually. You just change your "CheckTodaysDate" to the below and you should be able to select dates other than today and the To in the Date filter should always show today.

 

IF([Date] <= TODAY(), 1, 0)

 Before applying filter:

cath1ynn_0-1721105855744.png

After applying filter:

cath1ynn_1-1721105866792.png

 

Ritaf1983
Super User
Super User

Hi @a_dika 

Please refer to my solution in the linked discussion:
https://community.fabric.microsoft.com/t5/Desktop/PowerBI-Date-slicer-not-extending-to-the-latest-da...

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.