Power BI: -Relative Time Filter

By | May 7, 2020

A great features to have when reporting the relative Time Filter Option allows the developer to show only a certain set of date that is constrained relative to the current time. For example show only data from the last 24 hours onwards. In database parlance we often call this a sliding window function. Where we are interested only in data within a certain window of time. Typically this scenario would be useful in cases where we are monitoring the progress of an event such as a sale, call volumes in a call center, sensor information etc.

This is a preview feature and so needs to be enabled at the Report Options as shown in this post.

Once enabled the Report will need to be restarted for the change to take effect. In order to use the feature simply drag a slicer onto the canvas and use a Date dimension within it

Select Relative date or time as per the requirement as shown below

 

The filter can be applied to past as well as future date and across date ranges like months and years

Its especially useful for reports that query large spans of historical data often across years. This way the client sees the most current data by default and gets to choose the granularity as per their need.