Logical Operators AND | OR

This page will provide a description and examples for each Logical Operator that you can use in Report Builder

Overview

Each filter clause that you have added needs to be joined to the next set of filter clauses by using the AND and OR logical operators. If you want both filter clauses to be true, you use AND, else use OR.

Following the previous example from the Basic Comparison Operators page, using a Course Enrolment Base Report limiting the results to a (1) specific start date, (2) only students who are enrolled on a specific Course, and (3) only output records that are "Enrolled". If you want to make ALL three conditions to be true in the results of your output - you add the AND condition to the three of them.

To demonstrate the OR condition as part of the example above, let's say you want to add more filters on the students' "Country" and "Citizenship" information. The results should also check if the students have a Country OR Citizenship record as "Australia". Adding these filters will further down your results to students with a "Country" OR "Citizenship" as "Australia".

Drawing
Filter Clauses joined by the Logical Operators AND and OR

How to do it in Paradigm using the Report Builder menu?

In building your report, you can add the logical operators under the FILTER CLAUSES section by using the AND SET or OR SET menus, in continuation with entering your Basic Comparison Operators.

filter clauses under the AND Rule Set
additional filter clauses under the OR Rule Set

Another example using only the AND logical operator for all the filters clauses:

Sample Report using the AND logical operator

In the sample screenshot above, the AND logical operator is being used for the three filter clauses. Meaning the report will output only enrolments within the start dates of 2022-01-01 and the expected end date of 2023-01-01, with an enrolment status of Enrolled, and with an Invoice Id that is still blank. All four conditions should be true as the logical operator being used is AND. The above sample report is a report that will output Unit Enrolments that have not been Invoiced.

Refer to the information below for more details and examples on using the logical operator AND and OR in Report Builder:

AND

This will return all the data or information which are TRUE FOR ALL conditions separated by AND.

Example

β€œStart Date” > 2019-01-01 AND β€œCourse Enrolment Status Id” In ENROLLED

filter clauses joined by AND

Output

Conditions allow for clauses to be joined together to form more complex filter clauses. e.g. β€œStart Date” > 01/01/2019 AND β€œCourse Enrolment Status Id” In ENROLLED.

This will produce a list of students who have a start date greater than 01/01/2019 AND have a course enrolments status of enrolled. To appear in this data set the record must satisfy BOTH conditions. Or if more conditions are added using the AND condition the record has to meet all of the required criteria to be returned in the produced data set.

The example used for this report is the Centrelink report. This is a pre-saved report within the report builder

β€œPerson Status’ IN Active AND

β€œCourse Enrolment Status Id” IN Enrolled AND

β€œOverseas Student” NOT EQUAL Yes.

All three of these criteria have to be met for a record to appear within the data set produced for this report.

OR

This will return all the data or information which are TRUE FOR ANY of the conditions separated by OR.

Example

β€œStart date” >01/01/2018 OR β€œCourse Enrolment Status Id” in Enrolled

filter clauses joined by OR

Output

This will produce a list of students who have a start date of 01/01/2018 OR a Course Enrolment status of Enrolled OR both. The record only has to meet ONE criterion in the filter clauses to return a value in the produced data set.

NOTE:

You can have multiple filters (with AND and OR conditions) that can be mixed and matched to reduce the data set to produce a specific data set from the whole database, see the Advanced section: Nested Logical Operators Using AND | OR page

Last updated