Filtering Data Using Multiple Query Filters

Objective

After completing this lesson, you will be able to create multiple query filters to refine data retrieval in a Web Intelligence document.

Combine Multiple Query Filters

You can create and combine multiple query filters in Web Intelligence. This feature helps you refine the data that your query returns.

You add filters in the Query panel to organize how the data is filtered. When you use more than one filter, you can combine them with logical operators: AND / OR.

Watch the video to understand the difference between AND and OR operators.

Filter Prioritization

When you combine multiple query filters with both AND and OR operators, use parentheses to define the order in which the database processes them. For example, A AND (B OR C) does not return the same results as (A AND B) OR C.

Filter builder uses AND/OR logic to select 2017 sales revenue for Dresses in e-Fashion Dallas and Jackets in e-Fashion Los Angeles.

Prompt Variant Sets in the Prompts Dialog Box

A prompt variant is a saved set of answers for a document's prompts. It works like a bookmark for your data filters. Instead of filling in the prompt questions each time, you save your answers with a unique name. The next time you run the document, you select your saved variant, and Web Intelligence fills in all the answers for you.

Key Benefits:

  • Saves time: This is the main benefit. It turns a repetitive, multi-step process into a single step.
  • Improves accuracy: By saving your selections, you reduce the risk of choosing the wrong year, region, or other filter. Your documents become more consistent and reliable.
User creates a personal variant named Variant 01 to save selected prompt values, which then appears in the Available Variants list for future selection.

Variant Parameters

You can configure the following parameters:

  • Save Variant: You can use this button after you create, run, and save the Web Intelligence query in the SAP BI Platform Repository for the first time. Use it to create or save a prompt variant.
  • Variants Management: You can view a list of all prompt variants you have saved.
  • Public: You can share a variant so that any user can use it.

Group of Prompts

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

A warning prompts the user to answer at least one date filter before running, with options for year, quarter, or month selection.

Add Group of Prompts

In the Main panelPrompts tab, select the Add Group button in the toolbar to open the Create Group dialog box.

By default, a group is mandatory, and you must answer at least one of its prompts. Select the Optional checkbox to make the group optional.

By default, a group is not exclusive, and you can answer any prompt in the group. Select the Exclusive checkbox so that only one prompt in the group can be answered. Answering one prompt resets the values of the other prompts in the group.

To add prompts to this group, select optional prompts from the Available Prompts panel. The system moves your selected prompts to the Selected Prompts panel.

The Group button creates a prompt group named Select a Date Filter with year, quarter, and month prompts selected and exclusive option enabled.

Let's Summarize What You've Learned

  • Combine multiple query filters using AND and OR operators to refine data in Web Intelligence.
  • Use parentheses to prioritize filter logic and control the order of query processing.
  • Save prompt variant sets to quickly reuse filter answers and improve report accuracy.
  • Group prompts to control how users answer filter questions, including optional and exclusive settings.

Restrict Data with Multiple Filters

Business Example

Your manager asks you to create a report that allows users to analyze sales revenue by year, quarter, and store for both 2023 and 2024. The goal is to make it easy to select and compare different quarters from each year, each time the report is viewed. This helps management quickly spot trends and performance differences between the selected periods.