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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-jiewu-msft
Community Support
Community Support

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
v-jiewu-msft
Community Support
Community Support

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_
Memorable Member
Memorable Member

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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