Apply Relative Time Filters

Use the relative time filter on a Date or Date/Time column to display data for a specified time period based upon the current date and time.

You can specify a relative time period as either an explicit number of past or future time units (for example 2 years), or you can specify a previous period. For example, Year To Date which includes data from 1-January this year to the current date, and Month To Date which includes data from the beginning of the month to the current date.

You can apply a Relative Time filter only to date columns that already exist in the data source, and not to derived columns such as Year, or Quarter. The Relative Time filter type supports Date (with no time of day portion) and DateTime (that is, TIMESTAMP with both date and time of day) column types.

The current date and time used in queries is the Oracle Business Intelligence Server host's date and time in the server's timezone (not the browser host's time or timezone). The starting day of the week (Sunday versus Monday) is based on the locale of the Oracle Business Intelligence Server which is set using the server configuration setting NLS_TERRITORY.

  1. In the Visualize canvas, go to the filter bar and add a date range filter.
  2. Click the filter context menu, select Filter Type, and Relative Time to switch to a relative time filter.
  3. In the Relative Time filter, select a Type that defines the range that you want to filter.
    • Last - You specify a Period to apply to the selected Time Level (Years, Quarters, Months, Weeks, Days, and includes Hours, Minutes, and Seconds if the column time is TIMESTAMP) relative to today's date, to display records for the date values for that period.

      Last filters that are based on a DateTime column and which have a grain of Day or longer (for example, Year, Quarter, Month, Week, Day), retrieve data from the same time of day on the starting day. For example, if the Oracle Business Intelligence server date/time is currently Thursday 3:15pm , a Last 2 Days filter on a DateTime column retrieves data with timestamps between Tuesday 3:15pm and Thursday 3:15pm in the server's timezone. Filter queries that are based on a DATE column type (which by definition have no time of day associated) only depend on the server host's date, not the time of day.

    • Next - You specify a future Period number to apply to the selected Time Level (Years, Quarters, Months, Weeks, Days, also Hours, Minutes, and Seconds if the column time is TIMESTAMP) relative to today's date, to display records for the date values for that period.
    • To Date - You specify a past Time Level (Year, Quarter, Month, Week, Day, also includes Hour, and Minute if the column time is TIMESTAMP) relative to today's date, that you want to apply to the date values in the visualization.

      A To Date filter retrieves data from the beginning of the chosen period, for example, Month to Date retrieves data from midnight of the first day of this month up until the current date and time (that is, Today or Now).

  4. Click outside of the filter to close the filter panel.