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! Request now

Reply
alsolok
Helper II
Helper II

default data slicer

Hello everyone

 

I have a date table with a 4-year history plus the current year. I would like to set a default selection in my Power BI slicer for a year based on the current year without losing the history of other years. This means that if the default date range in my slicer is from 01/01/2024 to 12/31/2024, when I clear the slicer selection, it should return all the years in the table in the slicer, spanning from 01/01/2020 to 12/31/2024.

 

Please help me

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@alsolok , You can use preselected slicer from custom visual amitchandak_0-1706855837260.png

 

Or you can do the workaround by creating a column a column like below and save it on "This Year"

 

Year Type = Switch( True(),
year([Date])= year(Today()),"This Year" ,
year([Date])= year(Today())-1,"Last Year" ,
Format([Date],"YYYY")
)

 

Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@alsolok , You can use preselected slicer from custom visual amitchandak_0-1706855837260.png

 

Or you can do the workaround by creating a column a column like below and save it on "This Year"

 

Year Type = Switch( True(),
year([Date])= year(Today()),"This Year" ,
year([Date])= year(Today())-1,"Last Year" ,
Format([Date],"YYYY")
)

 

Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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