cancel
Showing results for 
Search instead for 
Did you mean: 

Report Query Conditional filters

Former Member
0 Kudos

Hello,

In one of the reports, I have 2 optional prompts where the users can either select ‘Yes’ or ‘No’.

Optional prompts:

  • 1.Include ABC: Yes/No
  • 2.Include XYZ: Yes/No

For example: There are 100 records in total

Others :50

ABC: 40

XYZ: 10

There can be 4 scenarios:

1.Include ABC: Yes

Include XYZ: Yes

I want to see 50 records in the report (40 ABC, 10 XYZ)

2.Include ABC: Yes

Include XYZ: No

I want to see 40 records in the report (40 ABC)

3.Include ABC: No

Include XYZ: Yes

I want to see 10 records in the report (10 XYZ)

4.Include ABC: No

Include XYZ: No

I want to see 50 records in the report (50 Others)

What I am doing in the query filter is:

Include ABC (response from user)

AND

Include XYZ(response from user)

By using 'AND', one of the scenarios (#1) is not working out.

Include ABC: Yes

Include XYZ: Yes

When the user is selecting ‘Yes’ for including ABC and XYZ, it is giving zero(0) records.

Can you please help me on how to apply the condition I query filters to get the number of records for all the 4 scenarios correctly?

Thank you!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi, yes I tried using 'OR' . The first scenario works but the rest 3 scenarios do not work correctly if I am using OR instead of AND.

Thank you!

kohesco
Active Contributor
0 Kudos

can you share a screenshot of your used filters please?

jenszulinski
Explorer
0 Kudos
Hi, Did you try using 'OR' instead of 'AND', in your first scenario?