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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
gregorr
New Member

Using a year from date hierarchy in a slicer does not offer relative date

I am using a slicer with a Year from date hierarchy and I would like to filter it for the past 3 years but it does not offer me relative date.

Date hierarchy is provided from the Date table (CALENDARAUTO()).

How to apply filter to the Year slicer that will show only the past 3 years?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @gregorr ,

Based on my testing, if using a slicer with a year from  date hierarchy, it is impossible to choose relative date in slicer settings.

vjiewumsft_0-1713404430496.png

vjiewumsft_1-1713404444945.png

please try the following methods:

1.Create the simple table.

vjiewumsft_2-1713404452523.png

2.Drag the date column into slicer visual and select relative date in slicer settings.

vjiewumsft_3-1713404459542.png

3.Select last three years in the slicer. The result is shown below.

vjiewumsft_4-1713404467377.png

You can also view the following documents to learn about relative date slicer.

Create a relative date slicer or filter in Power BI - Power BI | Microsoft Learn

 

Best Regards,

Wisdom Wu

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @gregorr ,

Based on my testing, if using a slicer with a year from  date hierarchy, it is impossible to choose relative date in slicer settings.

vjiewumsft_0-1713404430496.png

vjiewumsft_1-1713404444945.png

please try the following methods:

1.Create the simple table.

vjiewumsft_2-1713404452523.png

2.Drag the date column into slicer visual and select relative date in slicer settings.

vjiewumsft_3-1713404459542.png

3.Select last three years in the slicer. The result is shown below.

vjiewumsft_4-1713404467377.png

You can also view the following documents to learn about relative date slicer.

Create a relative date slicer or filter in Power BI - Power BI | Microsoft Learn

 

Best Regards,

Wisdom Wu

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

Wilson_
Super User
Super User

Hi gregorr,

 

If you want to use relative date, you need to be using an actual date/datetime column. Put a filter in your slicer visual for date.


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

 

P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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