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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors