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?
- Access to Oracle Analytics
- Download sample_order_lines2023.xlsx to your computer
Create a Dataset
In this section, you use the sample_order_lines2023.xlsx
file to create a dataset.
- Sign in to Oracle Analytics.
- On the Home page, click Create, and then select Dataset.
- In Create Dataset, click Drop data file here or click to browse, select the sample_order_lines2023.xlsx file, and then click Open.
- In Create Dataset Table from sample_order_lines2023.xlsx, click OK. Click Save
.
- In Save Dataset As, enter
sample_order_lines2023
, and then click OK.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.
- Click Create Workbook.
- In the workbook, close the Auto Insights panel.
- In the Data
panel, hold down the Ctrl key, select Sales, expand Ship Date, and then select Year.
- Right-click, select Pick Visualization, and then select Table
.
- Click Properties
. In Properties, click Auto in the Title row and then select Custom.
- In the custom title field, enter
Sales by Ship Date
.Description of the illustration sales_by_ship_date_year.png - In the Data panel, hold down the Ctrl key, select Sales, expand Order Date, and then select Year.
- Right-click, select Pick Visualization, and then select Table
.
- Click Properties
. In Properties,click Auto in the Title row and then select Custom. Enter
Sales by Order Date
in the custom title field.Description of the illustration sales_by_order_date_year.png - Click Save
. 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.
- Click Visualizations
. Under Dashboard Controls, select Dashboard Filter
and drag it to the canvas.
- Click Parameters
. Click Add Parameter
.
- In Create Parameter, enter
From Date
in Name. Click Text in the Data Type row and select Date. - Click the empty Initial Value field, click Calendar
, and then click 2024.
- Click the left arrow
and select 2019, the beginning year in the dataset.
- In the January 2019 calendar, click 1, and then click OK.
- In Parameters
, 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.
- Select the Sales by Order Date visualization. Click the Data
panel, select Order Date and drag it to Filters in the Grammar pane.
- In the Order Date filter, click Range, select Start at, click Bind to Parameter
, and then select From Date.
Description of the illustration bind_order_date_to_param.png - In From Date, click the Calendar
, 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 the illustration preview_order_date.png - Select the Sales by Ship Date visualization. In the Data panel, select Ship Date and drag it to Filters in the Grammar pane.
- In the Ship Date filter, click Range, select Start at, click Bind to Parameter
, and then select From Date.
Description of the illustration both_vizs_from_date.png - Click Save
.
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.
- In the Dashboard Filter control, click the Calendar
, click 2019, click January, and then click 1 to revert to the initial parameter value.
- Select the Sales by Order Date visualization. In the Grammar pane, right-click Order Date and select Modify Filter.
- In the Order Date filter, click Start at and select Range.
The beginning date is bound to the From Date parameter.
Description of the illustration modify_filter.png - Click Bind to Parameter
, click Current Date, and then click outside the dialog.
- Click Preview
. In the Dashboard Filter, click the Calendar
, 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 the illustration date_range.png - Click Save
.
Learn More
Bind Parameters to Range Filters in Oracle Analytics
F80487-01
March 2024
Copyright © 2024, Oracle and/or its affiliates.
Learn how to create date range parameters in Oracle Analytics.
This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software" or "commercial computer software documentation" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract. The terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services. No other rights are granted to the U.S. Government.
This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.