Filtering Data Using Prompts

Objective

After completing this lesson, you will be able to use prompts in query filters

Filter Data with Query Prompts

The following are uses of a prompted filter:

  • The Prompts dialog box allows you to specify the data that is selected and displayed in the report, allowing you to focus on a specific part of the information available.
  • A prompted filter allows multiple users viewing a single document to specify different subsets of the data and display them in the same tables and charts in the report.
  • You can use a prompted filter to define a question that displays whenever the data in the document is refreshed. The users can answer the prompt either by entering or by choosing values, depending on the parameter properties which have been specified for the prompt in the Query Panel. For example, you can use the prompted query filter to produce a report that shows sales revenue per state and prompts the user to choose a product category at each refresh. This way, you do not restrict the data displayed to a single product category, such as Jewelry. Instead, users choose the product category that interests them at that moment.
  • You can define prompts on any dimension, measure, or attribute object listed in the Universe outline in the Query Panel.
Prompt: 1: In the Query section of the toolbar. 2: Choose Refresh. 3: The Prompts screen appears. 4: Select a Category and choose Run.

Add a Prompt

You build a prompt in the Query Panel.

Add a Prompt: See text after image for more details.

Prompt Properties

Prompt Properties dialog box features:

Prompt properties: See text after image for more details.

The following parameters can be configured:

OptionDescription
Prompt textEnter the text that you want to display to prompt the user to select a value. This text displays each time the document is refreshed.
Prompt hintThis hint is displayed when the user must answer these prompts in the Prompts dialog box. It can be used by document designers to help their users answer these prompts
Prompt with List of ValuesChoose this option to display all the values for the object and allow the user to choose from those values.
Select only from listChoose this option to prevent users from entering values that do not exist in the database.
Keep last values selectedChoose this option to display by default the value chosen at the previous refresh. The user can change the value or use the previously chosen value.
Optional prompt

The optional prompt uses the Between operator and allows the user to enter two values to set the limits of a range, but the user enters only the lower end of the range. As a result, the generated query updates the operator from Between to Greater than.

When a prompt is made optional, the user can choose to ignore the prompt. The result is that everything is returned in the report. For example, if you make a year prompt optional, all years are retrieved in the report if the user chooses not to answer the prompt.

Set default valuesChoose this option to define the default values that displays in the prompt. Define the default values using one of the following methods:
  • In the Type a Value field, enter the values. Use the arrow to move the values to the field on the right.
  • Choose Values to choose the values from the list of values present in the database.

Procedure: To Create and Configure a Prompt

Follow these steps to create and configure a prompt:

  1. In the Query section of the toolbar, choose Edit.
  2. Drag the object you want to filter with a prompt and drop it in the Query Filters pane.
  3. Open the Operators list.
  4. Select an operator from the list.
  5. Open the Operand list.
  6. Select Prompt.
  7. Choose Prompt Properties to display the Prompt Properties dialog box.
  8. Adjust the settings.
  9. Choose OK.
  10. Choose Run.

Prompt Variant Sets in the Prompts Dialog Box

You can save a group of most used variable value sets as a prompt variant in the Prompts dialog box.

After the Web Intelligence document query is created, run, and saved for the first time, when you refresh or open the document, you can see the available prompt variants options in the Prompts dialog box. Once you have selected the values for each prompt in the Prompts Summary UI, you name and save the variable value set as a prompt variant. It is subsequently available in the Prompts dialog box from the available prompt variants list.

Prompt variant sets in the prompts dialog box: See the text before and after the image for more details.

Variant Parameters

The following parameters can be configured:

OptionDescription
Save variantThis feature is available after you have created, run, and saved the Web Intelligence query in the SAP BI Platform Repository for the first time. A button that allows you to create (or save) a prompt variant.
Variants managementThis feature lists any prompt variants you have saved
DeleteA button that allows you to delete an existing prompt variant.
PublicTo share it so that it can be used by any users

Add a Prompt

Additional Features Regarding Prompts

Prompts Tab

In Design mode, the Main Side Panel contains a tab named Prompts listing all the prompts of the document. If you select a prompt, the Build Side PanelObject Properties tab displays the properties of this prompt, including its hint and the queries it is coming from (this may be useful if the prompt has been factorized).

If your document contains prompts coming from several queries, you can define in which order they are displayed in the Prompts dialog box. Use the Move Up and Move Down buttons and click Apply to change the default order of the prompts. Click the Reset All button to restore the default order.

If variants have been defined for your prompts, you can click the Shared Variants button to open a dialog box where you can decide the ones to be public or to remain personal.

This Prompts tab is also available in Reading mode but it displays only the prompts answers and you cannot change prompts properties.

Prompt tab: See text before image for more details.

Group of Prompts

You can group optional prompts to define how they are displayed and how they are answered.

In Design mode, in the Main Side PanelPrompts tab, click the Add Group button in the toolbar to open the Create Group dialog box:

  • By default, a group is mandatory and at least one of the prompts it contains must be answered. Select the Optional checkbox to turn this group into an optional one.
  • By default, a group is not exclusive and any prompt of the group can be answered. Select the Exclusive checkbox so that only one of the prompts in the group can be answered. Answering one prompt of the group resets the answered values of its other prompts.
  • Add prompts to this group by clicking the optional prompts listed in the Available Prompts panel. The selected prompts are moved to the Selected Prompts panel.
Add group of prompts: See text after image for more details.

If all optional prompts of a group are deleted or turned to mandatory, the group no longer appears in the Prompts dialog box when the document is refreshed. But in Design mode, a Warning icon is displayed beside this group in the Main Side PanelPrompts tab to highlight that this group is no longer used. You can delete it or add new optional prompts to it.

When the document is refreshed, in the Prompts dialog box, the prompts are displayed under the groups to which they have been added. You can expand or collapse a group to show or hide its prompts. If a group is mandatory, you need to answer at least one prompt from this group. If a group is exclusive, you can answer only one prompt from this group.

Display group: See text before image for more details.

Log in to track your progress & complete quizzes