Before You Begin

This tutorial shows you how to create and bind a parameter to a request variable.

Background

This tutorial uses a subject area to create a workbook that enables a end user to select a currency, for example, Euros instead of US dollars when displaying amounts. You add a dashboard filter control and select a data element representing values. You use the data element as a filter and bind it to a parameter. The result overrides the request variable defined in the semantic model. In your workbook you use these steps:

  • Design a workbook that enables your users to select a value
  • Create a parameter
  • Bind the parameter to a request variable

What Do You Need?

  • Access to Oracle Analytics
  • Access to a subject area as a content author

Create a Workbook from a Subject Area

In this section, you select a subject area to create a workbook. This tutorial uses the A - Sample Sales subject area as an example. This workbook includes two visualizations. The table visualization uses Product Type, Brand, and Converted Revenue as the data elements.

  1. Sign in to Oracle Analytics.
  2. On the Home page, click Create. In Create, click Workbook.
  3. In Add Data, click the subject area to use as the data source and click Add to Workbook.


    Description of add_data_subject_area.png follows
    Description of the illustration add_data_subject_area.png
  4. In the Data Data pane icon pane, hold-down the Ctrl key and select two attributes (P4 Brand and P2 Product Type) and a measure (120 Converted Revenue) data elements. Right-click, Pick Visualization, and then select Table Table visualization icon.
  5. In the Data pane, select the measure (120 Converted Revenue) and drag it to Tile in the Grammar Grammar pane icon pane.
  6. Click Properties Properties pane icon. In Properties, click Auto in the Title row and select None.
  7. In Properties, click Totals Totals icon. In the Subtotal row, click None and select the attribute to use for the subtotal.


    The table visualization shows subtotal for Brand.

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

Create a Second Visualization and Parameter

In this section, the table visualization acts as a shortcut for creating a second visualization in the workbook. The visualizations show revenue in US dollars.

  1. In the table visualization, click the menu toggle Display visualization toolbar toggle. Click Menu, select Edit, and then select Duplicate Visualization.
  2. In the Data pane, select and drag Product (P1 Product) to replace Product Type (P2 Product Type) in Rows under the Grammar pane.
  3. Click Table in the visualization list and select Pivot pivot visualization icon.


    Description of pivot_prod_rev_brand.png follows
    Description of the illustration pivot_prod_rev_brand.png
  4. Click Parameters Parameters pane icon. In Parameters, click Menu Parameters menu icon and select Add Parameter.
  5. In Create Parameter, enter Select a Currency in Name. In the Available Values list, select Value.
  6. Click Add Value Add value icon twice to create three empty value fields. Enter USD, EUR, and AUD one in each of the value fields.
  7. In the Initial Value list, click Value list icon, and then select USD. Click OK.


    Description of select_curr_param.png follows
    Description of the illustration select_curr_param.png
  8. Click Save Save icon.

Bind a Request Variable to a Parameter

In this section, you create a dashboard filter control to hold the parameter that enables selecting the currency used in the workbook.

  1. Click Visualizations Visualizations pane icon. Under Dashboard Controls, select Dashboard Filters Dashboard Filters icon, drag it to the canvas, and then release above the existing visualization.
  2. Click Parameters Parameters pane icon. In Parameters, grab Select a Currency and drag it to the Dashboard Filters control.
  3. Click Properties Properties pane icon. In Properties, click Filter Controls Filter controls icon. In the Filter Type row, click List Box and select Inline List.


    Description of inline_curr_selections.png follows
    Description of the illustration inline_curr_selections.png
  4. In Parameters Parameters pane icon, click Menu Menu icon and select Request Variable Binding.
  5. In Request Binding, enter the name of the request variable for currency as it is defined in the semantic model.


    In this tutorial the semantic model request variable is PREFERRED_CURRENCY.

  6. Click the Parameter list, click Select a Currency parameter, and then click OK.


    In this tutorial, the PREFERRED_CURRENCY request variable is bound to the Select a Currency parameter.

  7. Click Save Save icon. Click Preview to test Select a Currency.


    Description of preview_select_curr.png follows
    Description of the illustration preview_select_curr.png

Learn More