Filtering Data Using Multiple Filters

Objective

After completing this lesson, you will be able to use multiple query filters to restrict data

Logical Operators for Multiple Conditions

To produce a report that precisely focuses on certain data, you may need to apply more than one filter. When you specify more than one filter in a query, the relationship between the filters must use either the AND or OR operator. These are known as logical operators.

The types of logical operators are as follows:

  • AND: You use AND when you want both conditions to be met to return a row from the database when you run a query.
  • OR: You use OR when you want either of the conditions to be met to return a row from the database when you run a query.

Watch this video to learn about the operators.

Filter Prioritization

A complex filter uses more than one filter in a single query. To ensure that the filters retrieve exactly the data you want, you need to prioritize the operators.

In the Query Filters panel, by positioning the query filter statements and deciding how to group them together, you define the filters that are processed first. The positioning and grouping of the filters depends on the logic of the information you are trying to retrieve.

Operator prioritization: See text before image for more details.

Procedure: To Reorder Multiple Filters

Follow these steps to reorder multiple filters:

  1. Create a query in the Query Panel.

    The query must use several query filters, which you will need to group and prioritize.

  2. In the Query Filters panel, drag and drop the query filters in the order you want them to display in your report.

    Drag a query filter on top of another one to group the filters together. Double click on the operator names to switch them between AND and OR to create the desired priority. The grouping of the query filters (represented by a vertical line) determines which query filters are processed first.

  3. Choose Run.

Tip: Purge Data

When you publish a document in a public folder or save a document in your personal folder, it is recommended to purge the Web Intelligence document data.

Here are the advantages of this action:

  • Improved document performance: Purging data in Web Intelligence helps in improving the document's performance by reducing the amount of data stored in the microcube, which in turn leads to faster query processing and report generation.
  • Data privacy and security: Purging data can help protect the privacy and security of the information in the document. This can reduce the risk of unauthorized access or data breaches, ensuring that only the required and appropriate data is available to authorized users.

Once the data is purged, the document displays an empty set of values. The structure and formatting of the document is retained. You can run the query later to return the up-to-date values from the data source.

Purge data: 1: In the Query section of the toolbar, choose More, Purge data. 2: Choose the queries. 3: Choose Purge. 4: Choose OK.

Restrict Data with Multiple Filters

Log in to track your progress & complete quizzes