cancel
Showing results for 
Search instead for 
Did you mean: 
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

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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors
Top Kudoed Authors