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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
idlebrain
New Member

Default & Custom dates on a Date slicer

Hi - 

I have standard date table with date fields from 2010 - 2030.  

I want to setup a date slicer with dynamic default date as start date of the year (for ex: 1/1/2023 for this year) when the report is open for first time.  Then it should also allow user to select any other date from slicer to run the report (without using any extra buttons or anything as such).  

Thanks for any inputs.

 

 

 

2 REPLIES 2
Ritaf1983
Super User
Super User

Hi @idlebrain 
A simple way to do this is to use the "Related dates" slicer
And choose "Current year" as publishing
The users can play with it and change it quite easily if they wish.

Ritaf1983_0-1684557262107.png

The complex way is described here :
https://darren.gosbell.com/2023/05/setting-a-dynamic-default-slicer-value-in-power-bi/

 

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

Thanks for the response but that will not help me.  

Little bit more explanation of my requirement.

I have date field with values in mm/dd/yyyy format from 1/1/2010 to 1/1/2030.  

I need a date slicer with dynamic default value as "start date of the year" i.e. 1/1/2023 if the report is ran this year.  If the report is ran next year, default selection is 1/1/2024.  This slicer should also allow any other date to be selected to run the report.  

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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