Ravindra BagaleCourses & study guides मराठी Track your progress

22. Filters and Slicers

22.5 Relative Date and Relative Time Filters

Start with a problem

Zoya wants a page that always shows this month without editing the filter every month.

Explain simply

A relative date filter keeps dates relative to today (last N days, this month, last calendar month). A relative time filter works with minutes and hours.

Show the data

Assume today is 06-May-2026 (IST) Rows
Is in this month 304–308
Is in the last 1 months (calendar) 301–303 (April)

About this data: This table uses columns: Assume today is 06-May-2026 (IST), Rows. This table uses columns: Filter, Total Sales. This table uses columns: Filter type, Settings, Example. This table uses columns: Wrong result, Reason, Correction. Values shown are the lesson examples already on this page (not a new dataset).

Fictional sample data. Practice file: visuals_orders_apr_may_2026.csv (source: src/practice/).

Demonstrate

  1. Filters pane › Order Date › Filter type Relative date.
  2. Show items when the value is in this › month › Apply.
  3. Change to is in the last 1 months (calendar).

Show the result

Your result should look like this (fictional sample):

Filter Total Sales
This month (May) ₹1,200
Last 1 calendar month (April) ₹900

Explain what happened

Power BI calculates the date range from the current date at query time, so the page moves on by itself next month.

Explore further

  • Check time-zone behaviour in the Service near midnight IST (see the reference below).

Detailed reference for this lesson:

Filter type Settings Example
Relative date Show items when the value is in the last / is in this / is in the next, a number, and a unit: days, weeks, weeks (calendar), months, months (calendar), years, years (calendar); Include today Order Date is in the last 30 days; is in this month
Relative time is in the last / this / next N minutes / hours Order DateTime in the last 2 hours (near-real-time monitor)

Calendar vs rolling

"Last 1 months (calendar)" = the whole previous calendar month (e.g. all of September). "Last 1 months" = a rolling window ending today. Also, relative filters use the current date/time at query time. Check the current documentation on time zones, karan an IST report viewed near midnight may behave differently in the Service.

Ravindra Bagale's Tip

Friends, pay attention: relative date filters use today's date, and students forget that the Service may evaluate "today" in UTC, which differs from IST around midnight. Also check whether "Last 7 days" should include today. Test relative filters after publishing, not only in Desktop. Try it once more, then move on.

Fix common mistakes

Wrong result Reason Correction
Rolling 30 days used for last month months vs months (calendar) Use months (calendar) for whole months
Different result in the Service after midnight IST Service may evaluate today in UTC Test after publishing; add a buffer
FY quarter not available Relative filter is calendar-based Use a Date table with FY columns

Practise independently

Practice task

If today were 15-Apr-2026, what would is in this month show?

Hints
  • April rows.
Solution

301–303, ₹900.

Think like a professional

Relative filters remove monthly maintenance – but test them in the Service for IST users.

Ravi Sir's Cards for this lesson

मराठी cards