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! Learn more

Reply
Anonymous
Not applicable

Is there a way to specify the end date as todays date for a date slicer by default. I need to select

Is there a way to specify the end date as todays date for a date slicer by default. I need to select future dates also. Please help.

8 REPLIES 8
Anonymous
Not applicable

Hello @Anonymous ,

 

if you need to current date and further dates to show in slicer, create column,

AfterCurrentMonth = IF(TableName[Date]>=TODAY(),TRUE(),FALSE())
 
And pass this column as filter and select "True"
 

 

v-jingzhang
Community Support
Community Support

Hi @Anonymous 

You can add below measure to the date slicer's visual-level filter and set value is 1 to show dates that are on or before today. You can have future dates in your date table and use them in other visuals.

OnOrBeforeToday = IF(SELECTEDVALUE('Date'[Date])<=TODAY(),1)

030903.jpg

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

Anonymous
Not applicable

@v-jingzhang still showing published date not todays date.

@Anonymous  Your published date is after today or before today? What is the date range of this date column in the table? Does it include today's date? All the dates to be shown in the slicer should exist in the date column.

Anonymous
Not applicable

@v-jingzhang Published with current date, Calendar table contains todays date also.

Hi @Anonymous 

I saw that you have posted another topic about this issue. In that topic, you said your calendar table contains dates which is >= todays date only. What is the storage mode of your calendar table? Is it in Import mode? If so, I think this is the cause of this issue because data in Import table will not change until it is refreshed.

 

For example, if I publish the report on current day (3/12), so today() function gets the result (3/12). But as time goes by to tomorrow, the result of today() function should be 3/13. If you use today() function in a measure and use this measure to populate a visual in the report, it will change according to the service time dynamically. However, if you use today() function to create a calendar table and you don't refresh the dataset on 3/13, it will still show 3/12 as the start date in your calendar table. That is why you see the published date by default. You need to refresh the dataset on Service so that it will update the calendar table to use tomorrow's today as the start date. If you create a calendar table in PQ or from other data sources, it behaves the same when it is an Import table.

 

Regards,
Community Support Team _ Jing

Anonymous
Not applicable

Not sure if you can do this in your current date column/table. If the future dates have no corresponding data then the slicer would automatically stop at current date. In any case, you can always create a new date table with the help of below dax:

Date table = CALENDAR(MIN('Table'[Date]),TODAY())
Here, the 'Table'[Date] is your existing date column. Use this instead in the slicer. Mark this post as solution and don't forget to kudo if I was able to help you.
smpa01
Super User
Super User

@Anonymous  yes there is a way. While creating the dateTbl in data, you can create it in a way where the endDate in today's date.

Basic Dynamic dateTble in PQWRY

let
    Source = {Number.From(#date(2020,1,1))..Number.From(Date.From(DateTime.LocalNow()))},
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Added Custom" = Table.AddColumn(#"Converted to Table", "Custom", each Date.From([Column1]))
in
    #"Added Custom"
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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