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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
JLeflaive
New Member

Relative date filter for month to date

I need to have a relative filter for a report that filters for all dates in the current month but excluding anything after yesterday.

 

The Current Month filter does not work because it includes data for the entire month.

 

Be glad of any assistance please!

1 ACCEPTED SOLUTION
djurecicK2
Super User
Super User

Hi @JLeflaive ,

 Are you using a date table? If so, you can try creating a column like IsYesterdayorBefore and filtering the report or visual on this field where this field is true. Use this filter in conjunction with the relative data slicer.

 

Something like this:

 

IsYesterdayorBefore =
var YesterdaysDate= TODAY()-1
return
IF(Dates[Date]<=YesterdaysDate,True, False)

View solution in original post

2 REPLIES 2
djurecicK2
Super User
Super User

Hi @JLeflaive ,

 Are you using a date table? If so, you can try creating a column like IsYesterdayorBefore and filtering the report or visual on this field where this field is true. Use this filter in conjunction with the relative data slicer.

 

Something like this:

 

IsYesterdayorBefore =
var YesterdaysDate= TODAY()-1
return
IF(Dates[Date]<=YesterdaysDate,True, False)

Thanks, that works!

Helpful resources

Announcements
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.

May 2025 Monthly Update

Fabric Community Update - May 2025

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