Before you Begin

Learn how to limit the list of values in a filter using parameter binding in Oracle Analytics.

Background

In this tutorial, you create a parameter to use to limit the number of values of a list filter.

Binding a parameter to a list filter enables the parameter to listen for any value from the list filter and accept or reject the value based on the parameter definition. This tutorial uses the City data element as the example for binding a parameter to a list filter. When you constrain the list filter values, the user can only select the values defined in the parameter definition. The visualizations that you create in the workbook are updated when the user selects a City value.

What Do You Need?

Create a Dataset

In this section, you add the sample_order_lines.xlsx file to Oracle Analytics to create a dataset table.

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


    Description of sample_order_lines.png follows
    Description of the illustration sample_order_lines.png

Create Visualizations

In this section, you create the visualizations to use with the constrained list filter.

  1. Click Create Workbook.
  2. In the Data pane, select Sales and drag it to the canvas.


    Oracle Analytics creates a tile visualization of total sales in the dataset.

  3. In the Data pane, select Quantity Ordered, drag it to the canvas, and then release it next to the Sales tile visualization.
  4. In the Data pane, hold down the Ctrl key, click Sales, and then click Product Sub Category. Right-click, select Pick Visualization and select Horizontal Bar Horizontal Bar vis icon.



    Description of visualizations.png follows
    Description of the illustration visualizations.png
  5. Click Add Filter Add Filter icon. In the sample_order_lines list, click Product Sub Category, and then click Top Bottom N.
  6. In Top Bottom N, click Select Measure and click Sales. Keep Top as the Method, and 10 as the Count. Click outside the filter dialog.


    Description of prod_subcat_top_10.png follows
    Description of the illustration prod_subcat_top_10.png
  7. In the Sales by Product Sub Category visualization, click Menu Menu icon, select Sort By, select Sales, and then select High to Low.


    Description of prod_subcat_hilo.png follows
    Description of the illustration prod_subcat_hilo.png

Create a Parameter

In this section, you define a parameter using the City data element in the sample_order_lines dataset.

  1. Click Parameters Parameters. Click Add Parameter Add Parameter icon.
  2. In Create Parameter, enter City in Name.
  3. Keep Text as the Data Type.
  4. Click Allow Multi Select Multi Select Enabled icon to disable the ability to select more than one city.


    If the Multi Select toggle contains a white side and gray side Multi Select Disabled icon then the ability to select multiple values is disabled.

  5. From the Available Values list, select Value.
  6. Click Add Value four times to create five fields. Enter the following values one in each value field:
    • Seattle
    • Los Angeles
    • Denver
    • Boise
    • Salt Lake City
  7. Leave the Initial Value field empty and click OK.


    Description of create_param.png follows
    Description of the illustration create_param.png

Create a Dashboard Filter Control

In this section, you add a dashboard filter control, add the City data element to the list filter, and then bind the City parameter to the list filter.

  1. Click Visualizations Visualizations pane icon.
  2. In Visualizations under Dashboard Controls, select and drag Dashboard Filters Dashboard Filters icon to the canvas.
  3. Click Data Data pane icon.
  4. In the Data pane, select City and drag it to the Dashboard Filter control.


    Description of city_filter.png follows
    Description of the illustration city_filter.png
  5. Click All to open the City Filter dialog.


    There are 133 cities in the dataset. Too many to search through the list for the cities your users want to view.

    Description of all_cities.png follows
    Description of the illustration all_cities.png
  6. In Filter Controls, click the X to delete the City data element.
  7. From the Data pane, select and drag City to the Filter Bar.
  8. In the Filter dialog, click Bind to Parameter Parameters icon.


    The parameter icon turns green Green parameter icon in the filter dialog when the filter is bound to the parameter.

  9. Click Parameters Parameters pane icon. Select and drag the City parameter to the dashboard filter control.
  10. Click the dashboard filter control list and select a city.


    The City dashboard filter list doesn't contain an initial value. The values defined in the parameter display when you click the list.

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

Review the Constrained Filter

In this section, you select from list of values in the filter to see the changes in the visualizations.

  1. Click Preview Preview icon.
  2. Click City and select Denver.


    Description of selected_city.png follows
    Description of the illustration selected_city.png
  3. Click Edit Edit icon.

Enable Multiple Values in the Parameter

In this section, you edit the City parameter to use multiple values from the list filter.

  1. In the Visualize page, click Parameters Parameters icon.
  2. Right-click the City parameter and select Edit Parameter.
  3. In Edit Parameter, click Allow Multi Select Multi select off icon and click OK.


    The Allow Multi Select icon should have a green square on the right side Allow Multi Select on icon.

  4. Click Yes to overwrite the current value.
  5. Click Save Save icon.
  6. In the dashboard filter, click City, select Seattle and Salt Lake City, and then click outside of the dialog.


    Oracle Analytics updates the visualizations with the values from the selected cities.

    Description of multiple_cities.png follows
    Description of the illustration multiple_cities.png

Learn More