Before You Begin

Learn how to define a set parameter data action in Oracle Analytics.

Background

In Oracle Analytics, the set parameter data action enables creating a data action that updates a chosen parameter with values from selected data points. In this tutorial, you create a button bar with buttons that are labeled with the data points represented in a visualization. When the consumer clicks a button, the set parameter data action is invoked to update the visualization.

What Do You Need?

Create a Dataset

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

  1. Sign in to Oracle Analytics.
  2. On your home page, click Create and click 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 a Workbook with Visualizations

In this section, you create a workbook with a visualization showing sales by product sub categories.

  1. Click Create Workbook. Close the Insights panel.
  2. In the Data Data pane icon pane, hold the Ctrl key, select Sales and Product Sub Category. Right-click, select Pick Visualization and select Horizontal Bar horizontal bar icon.


    Description of sales_prodsubcat.png follows
    Description of the illustration sales_prodsubcat.png
  3. In the Data pane, select Product Category and drag it to Filters in the Grammar pane.
  4. In the Product Category filter dialog, click Furniture, Office Supplies, and Technology as the values for the filter. Click outside of the dialog.

Create a Parameter and Data Action

In this section, you create a parameter on product category and create a set parameter data action.

  1. Click Parameters parameters pane icon. In the Parameters pane, click Menu menu icon and select Add Parameter.
  2. In Create Parameter, enter Select a Product Category in Name.
  3. Click Allow Multi Select. In Available Values, click Any list icon and select Column.
  4. Click list list icon in the empty field and select Product Category from sample_order_lines2023. Click OK.


    Description of create_param.png follows
    Description of the illustration create_param.png
  5. Click Actions Actions pane icon. Click Create Action Create Action icon.
  6. In Create Action, enter Set Category in Name. Click URL Navigation list icon in Type and select Set Parameter.
  7. In Requires Data, click On to disable this requirement. In Parameter, click None and click Select a Product Category. Click Create.


    Description of create_set_param_da.png follows
    Description of the illustration create_set_param_da.png
  8. Click the Sales by Product Sub Category visualization.
  9. In the Grammar Grammar pane icon, right-click Product Category in Filters and select Edit Filter. Click Bind to Parameter parameters icon, click Select a Product Category. Click outside the dialog.


    The parameter icon changes color to blue bound to parameter icon when the filter is bound to a parameter.

    Description of bound_vis_filter.png follows
    Description of the illustration bound_vis_filter.png

Create a Button Bar

In this section, you create a button bar with three buttons that represent each product category. The buttons enable your consumers to select the sales data to view in the visualization.

  1. Click Visualizations Visualizations pane icon. In the Visualizations pane, select Button Bar Button bar icon and drag it to the canvas above the horizontal bar visualization.


    Description of button_bar_control.png follows
    Description of the illustration button_bar_control.png
  2. Click Properties Properties icon. In Properties, click Controls Controls icon. In Add Controls, click Add Controls twice to add two buttons to the button bar.
  3. Enter Furniture in the Label row of the first button. Enter Office Supplies in the Label row of the second button and enter Technology in the Label row of the third button.
  4. In the Furniture button properties, click None in the Action row, click Select Category. Click Edit Edit pencil icon. In Set Action Value, select Furniture and click Set.
  5. In the Office Supplies button properties, click None in the Action row, click Select Category. Click Edit Edit pencil icon. In Set Action Value, select Office Supplies and click Set.
  6. In the Technology button properties, click None in the Action row, click Select Category. Click Edit Edit pencil icon. In Set Action Value, select Technology and click Set.


    Description of three_buttons.png follows
    Description of the illustration three_buttons.png

Test the Set Parameter Data Action

In this section, you test the buttons and the set parameter data action.

  1. Click Save Save icon. In Save Workbook, enter a Name and click Save.
  2. Click Preview Preview icon.
  3. In Preview, click Furniture.


    Description of furniture_sales.png follows
    Description of the illustration furniture_sales.png

Learn More