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
Niiru1
Helper V
Helper V

Filter month year column to exclude past dates from slicer

I have a dates key table that runs from Jan 2018 - Jan 2021.

 

I have a month year column (Text Format) so it doesn't display data past today:

On or Before Today = 'DimDate'[DateS] <= EOMONTH(TODAY(),0)
 
Is there a way to have a slicer's past dates respected when it changes?
e.g. When I slice the last 24 months I get this
 
Filter date.PNG
 
However when I slice the last 2 months I still get the begining dates of slicer:Filter date1.PNG
 
Something along the lines of this???
On or Before Today = ALLSELECTED('DimDate Sort'[Dates]) >= 'DimDate'[DateS] <= EOMONTH(TODAY(),0)

 

Thanks in advance
 
*CAVEAT - I have a DimDate table for counts and a DimDate Sort to build relationships off in case you're wondering
4 REPLIES 4
amitchandak
Super User
Super User

@Niiru1 , Following this video, if you want to select date/month and then have rolling month.

https://www.youtube.com/watch?v=duMSovyosXE

 

You can also refer this for List of value

https://community.powerbi.com/t5/Desktop/Required-custom-date-Slicer-Last-7-days-last-15-days-last-3...

Fowmy
Super User
Super User

@Niiru1 

Relative Date slicer always takes the current date to calculate the dates, that cannot be changed.

What is your expected output when you select a range?

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@Fowmy  I'm hoping to get an expected output like this if I cast the slicer date range at last 2 months:Filter date2.PNG

@Niiru1 

I am not sure how you have set up your model and the relationships. Also, The measure you are using can be another point to check. If you could share a sample PBIX file, it's possible to identify the cause.

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

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.

Top Solution Authors