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

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

Reply
KalvisT
New Member

Date hierarchy slicer, limit how many years are shown

Hei,

 

I have created a date table with DAX Calendar. Im using it to filter other tables that has date columns. 

 

The problem is that the table I created contains many years in the future. How could I limit date hierarchy slicer so that it would show only Previous, This and Next year? Or this and previos year. 

 

Thanks a lot! 

3 REPLIES 3
Anonymous
Not applicable

Hi @KalvisT ,

 

How about adding a year slicer? Filter the years you want directly.

vstephenmsft_0-1640067985827.png

 

 

Best Regards,

Stephen Tao

 

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

 

 

amitchandak
Super User
Super User

@KalvisT , You can create a new column like this and filter at page or slicer level using that

 

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

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

Thanks for the idea, but adding it on all page level doesn't reduce the amount year values on my date hierarchy slicer. Have added it as is this year or next year but sadly doesn't do the trick. 

Helpful resources

Announcements
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