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
Shahinkmajeed
Helper I
Helper I

Set current date as default date in slicer

Dear All,

 

I have a slicer window with a date field as below. On page load, I want this field to auto select the current date. Can somebody please help on this urgently.

 

For e.g today it should auto select 02/09/2018, tomorrow it should be 03/09/2018 and son on. 

image.png

 

Regarsds,

Shahin K

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Shahinkmajeed,

 

You can't do this directly in the report designer, but you should be able to do some modelling to make it work. Here I made one sample for your reference.

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwtNA3sNQ3MFTSUTJUitVBEjICChmhCoFUGaMKGQOFTJRiYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [date = _t, sale = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"date", type date}, {"sale", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if Date.IsInCurrentDay( [date] )
then "Today"
else [date])
in
    #"Added Custom"

Also you can use DAX to get the similar result.

 

Column2 = IF(Table1[date]=TODAY(),"today",CONCATENATE(Table1[date],""))

 

Here is the result for your reference.

Capture.PNG

 

For more details, please check the pbix as attached.

 

https://www.dropbox.com/s/qbjxrul1ytjjq7d/slicer.pbix?dl=0

 

Regards,

Frank

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @Shahinkmajeed,

 

You can't do this directly in the report designer, but you should be able to do some modelling to make it work. Here I made one sample for your reference.

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwtNA3sNQ3MFTSUTJUitVBEjICChmhCoFUGaMKGQOFTJRiYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [date = _t, sale = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"date", type date}, {"sale", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if Date.IsInCurrentDay( [date] )
then "Today"
else [date])
in
    #"Added Custom"

Also you can use DAX to get the similar result.

 

Column2 = IF(Table1[date]=TODAY(),"today",CONCATENATE(Table1[date],""))

 

Here is the result for your reference.

Capture.PNG

 

For more details, please check the pbix as attached.

 

https://www.dropbox.com/s/qbjxrul1ytjjq7d/slicer.pbix?dl=0

 

Regards,

Frank

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Dear @v-frfei-msft

 

Thank you so much. It worked. 

 

 

Regards,

Shahin 

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