Before you Begin

This tutorial shows you how to create visualization date filters, bind the date filters to a parameter, and enable users to select a date value to update the visualizations in the workbook.

Background

In this tutorial, you create a date type parameter and two table visualizations that use different date data elements. In each visualization, you create a visualization filter with the date data element using the filter's Range Start at operator. You bind the visualization filters to the date type parameter. You add a dashboard filter control to the workbook and drag the date type parameter to it enabling users to select a date value to use with the visualizations.

You also modify one of the visualization filters to use the date range operator and a system parameter.

What Do You Need?

Create a Dataset

In this section, you use the sample_order_lines2023.xlsx file to create a dataset.

  1. Sign in to Oracle Analytics.
  2. On the Home page, click Create, and then select Dataset.
  3. In Create Dataset, click Drop data file here or click to browse, select the sample_order_lines2023.xlsx file, and then click Open.
  4. In Create Dataset Table from sample_order_lines2023.xlsx, click OK. Click Save Save icon.
  5. In Save Dataset As, enter sample_order_lines2023, and then click OK.


    Description of sample_order_lines2023_ds.png follows
    Description of the illustration sample_order_lines2023_ds.png

Create Visualizations

In this section, you create two table visualizations that use a measures (Sales) and a different date data element in each.

  1. Click Create Workbook.
  2. In the workbook, close the Auto Insights panel.
  3. In the Data Data panel panel, hold down the Ctrl key, select Sales, expand Ship Date, and then select Year.
  4. Right-click, select Pick Visualization, and then select Table Table icon.
  5. Click Properties Properties icon. In Properties, click Auto in the Title row and then select Custom.
  6. In the custom title field, enter Sales by Ship Date.


    Description of sales_by_ship_date_year.png follows
    Description of the illustration sales_by_ship_date_year.png
  7. In the Data panel, hold down the Ctrl key, select Sales, expand Order Date, and then select Year.
  8. Right-click, select Pick Visualization, and then select Table Table icon.
  9. Click Properties Properties icon. In Properties,click Auto in the Title row and then select Custom. Enter Sales by Order Date in the custom title field.


    Description of sales_by_order_date_year.png follows
    Description of the illustration sales_by_order_date_year.png
  10. Click Save Save icon. In Save Workbook, enter a Name, and click Save.

Create a Date Parameter

In this section, you add a dashboard filter visualization to the canvas and create a date type parameter. You add the parameter to the dashboard filter so that end users can select a start date and interact with the workbook's visualizations.

  1. Click Visualizations Visualizations pane icon. Under Dashboard Controls, select Dashboard Filter Dashboard filter control icon and drag it to the canvas.
  2. Click Parameters Parameters pane icon. Click Add Parameter Add icon.
  3. In Create Parameter, enter From Date in Name. Click Text in the Data Type row and select Date.
  4. Click the empty Initial Value field, click Calendar Calendar icon, and then click 2024.
  5. Click the left arrow left arrow icon and select 2019, the beginning year in the dataset.
  6. In the January 2019 calendar, click 1, and then click OK.
  7. In Parameters Parameters pane icon, select From Date and drag it to the Dashboard Filter visualization.


    The filter uses the January 1, 2019 initial value in the From Date parameter.

Bind the Parameter to Different Dates

In this section, you create date filters and bind the From Date parameter to the date filters.

  1. Select the Sales by Order Date visualization. Click the Data Data panel panel, select Order Date and drag it to Filters in the Grammar pane.
  2. In the Order Date filter, click Range, select Start at, click Bind to Parameter bind to parameter icon, and then select From Date.


    Description of bind_order_date_to_param.png follows
    Description of the illustration bind_order_date_to_param.png
  3. In From Date, click the Calendar Calendar icon, click 2019, click 2023, and then click 1 in January.


    Oracle Analytics updates the Sales by Order Date visualization to show the sales total for 2023.

    Description of preview_order_date.png follows
    Description of the illustration preview_order_date.png
  4. Select the Sales by Ship Date visualization. In the Data panel, select Ship Date and drag it to Filters in the Grammar pane.
  5. In the Ship Date filter, click Range, select Start at, click Bind to Parameter bind to parameter icon, and then select From Date.


    Description of both_vizs_from_date.png follows
    Description of the illustration both_vizs_from_date.png
  6. Click Save Save icon.

Modify Order Date Visualization Filter

In this section, you modify the Order Date visualization filter to use a range of dates rather than the Start at operator.

  1. In the Dashboard Filter control, click the Calendar Calendar icon, click 2019, click January, and then click 1 to revert to the initial parameter value.
  2. Select the Sales by Order Date visualization. In the Grammar pane, right-click Order Date and select Modify Filter.
  3. In the Order Date filter, click Start at and select Range.


    The beginning date is bound to the From Date parameter.

    Description of modify_filter.png follows
    Description of the illustration modify_filter.png
  4. Click Bind to Parameter bind to parameter icon, click Current Date, and then click outside the dialog.
  5. Click Preview Preview icon. In the Dashboard Filter, click the Calendar Calendar icon, click 2019, click 2020, click January, and then click 1.


    The Sales by Order Date visualization uses a date range filter. The data in both visualizations updates when the user selects a different date in the dashboard filter.

    Description of date_range.png follows
    Description of the illustration date_range.png
  6. Click Save Save icon.

Learn More