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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
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! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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