Skip to main content

Power BI

New

Relative Date Filters For "is in the previous or current" and "is in the current or next"

Vote (8) Share
Peter Ivers's profile image

Peter Ivers on 11 Feb 2025 20:07:03

When you want your date dim to span a relative period for last year plus next month (e.g. appointments, some that have not happened yet), you can do a filter like this (is in the previous 365 days OR is in the next 30 days) . The problem is that the relative next/prev are non-inclusive of the current period, so do not include today. Same of any timeframe, if I said last year or next year in 2025, 2025 does not appear, just 2024 and 2026.  You are forced to use absolute dates meaning periodically updating your code as time advances.


Suggestion, add options for: 

  • is in the previous or current
  • is in the current or next



Comments (1)
Peter Ivers's profile image Profile Picture

Peter Ivers on 12 Feb 2025 19:53:03

RE: Relative Date Filters For "is in the previous or current" and "is in the current or next"

We found a workaround, which is horrible. Incidentally, the suggestion value would read better as "is in the current or previous' [3] [Years].From the DateValue filter, select Date Filters::Between Click (Advanced) Click [Add Clause] Click back to (Basic) Select  [is in the previous] [2] [Years]    (or)  [is in year] [This Year]    (or)  [is in the next] [1] [Years]  Read the conditions to make sure the logic is what you want Click [OK] and “Close & Apply” on the top left of the toolbar