Pragmatic Works Nerd News

Relative Date Filters in Power BI

Written by Mitchell Pearson | Aug 01, 2026

In this video, Mitchell Pearson from Pragmatic Works dives into the power of relative date filters in Power BI and how they can be leveraged to fix common data visualization issues. While relative dates are already an essential feature, Mitchell focuses on using them to enhance filter context, ensuring visuals display data correctly across charts, tables, and card visuals.

 

Understanding the Problem

Mitchell begins by explaining a scenario with a customer who experienced inconsistencies between chart visuals and card visuals. While DAX calculations were working in charts with additional filters, the card visual displayed drastically different numbers. The main issue revolved around how filter context affects calculations differently across visuals.

  • Chart Visual: Correctly showed year-to-date (YTD) sales, prior year sales, and percent growth for each month.
  • Card Visual: Displayed incorrect year-to-date percent growth due to an incomplete understanding of date context.

Filter Context Explained

Mitchell demonstrates that the card visual was aggregating data for the full year instead of stopping at the current date. This misalignment between current year and prior year totals caused the numbers to appear negative, even though performance was strong.

To address this, one could write a custom DAX measure to capture the maximum date with values and then calculate prior year totals up to that date. While effective, this approach can be complex for new users.

Using Relative Date Filters as a Solution

Mitchell highlights an elegant alternative: using relative date filters in Power BI. This method is simpler and highly effective.

  1. Open the Filters pane and select the relevant date column from your date table.
  2. Change the filter type from basic to Relative Date.
  3. Configure the filter to cover the last 12 months, ensuring the filter intersects with the current year.
  4. Apply the filter so that only dates up to the current date are included, automatically updating as new dates are added.

This approach ensures that all visuals, including card visuals, correctly calculate YTD metrics relative to the current date without manual DAX adjustments.

Considerations and Limitations

  • Relative date filters need to be added to each report page manually; they do not carry over automatically.
  • This solution is less dynamic if users want to select prior years. For example, comparing 2022 to 2021 requires modifying the DAX measures directly.
  • Mitchell recommends reviewing additional Pragmatic Works videos for learning more about filter context and DAX fundamentals to tackle more advanced scenarios.

Conclusion

Mitchell Pearson demonstrates that relative date filters are a powerful and user-friendly method to maintain accurate filter context across Power BI visuals. By understanding how date filters interact with DAX measures, analysts can ensure that charts, tables, and card visuals consistently reflect accurate YTD and prior-year comparisons.

For beginners looking to strengthen their DAX skills and filter context knowledge, Mitchell suggests checking out two additional videos on the Pragmatic Works YouTube channel: a one-and-a-half-hour session on filter context and a three-hour DAX fundamentals workshop. These resources provide deeper insights for building robust Power BI reports.

Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Power BI and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks.