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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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