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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Sanskruti
Helper II
Helper II

Default date slicer

Hello,

 

I want to create a slicer which shows start date and end date. 
End date should be today's date by default and start date should be -12 months with 1st day of the month. 

For example the end date is 20/7/2023, start date should be 1/7/2023.

 

Thank you in advance.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Sanskruti ,

 

Please create a measure:

Measure = 
VAR _today = TODAY()
VAR _12_month_1st_date = EOMONTH(_today,-13) + 1
VAR _filter = IF(MAX('Date'[Date])>=_12_month_1st_date && MAX('Date'[Date])<=_today,1)
RETURN
_filter

And apply it to slicer's filter:

vcgaomsft_0-1692856200724.png
Output:

vcgaomsft_1-1692856224479.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

3 REPLIES 3
HarishKM
Memorable Member
Memorable Member

@Sanskruti Hey,
You can use below method to fulfill your requirement .
select your date slicer then select relative date from date filter pane then select last 1 year and check including today. Kindly refer below image.

 

HarishKM_0-1692869278901.png

Thanks

Harish M.

 

Anonymous
Not applicable

Hi @Sanskruti ,

 

Please create a measure:

Measure = 
VAR _today = TODAY()
VAR _12_month_1st_date = EOMONTH(_today,-13) + 1
VAR _filter = IF(MAX('Date'[Date])>=_12_month_1st_date && MAX('Date'[Date])<=_today,1)
RETURN
_filter

And apply it to slicer's filter:

vcgaomsft_0-1692856200724.png
Output:

vcgaomsft_1-1692856224479.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Idrissshatila
Super User
Super User

Hello @Sanskruti ,

 

Refer to this solution https://community.fabric.microsoft.com/t5/Desktop/Custom-default-date-on-date-range-slicer/m-p/24630...

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin
Vote For my Idea 💡



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!




Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors