PDA

View Full Version : Filters with both AND and OR, grouped?


CraigYellick
November 10th, 2020, 01:23 PM
Does not seem to be a way to combine AND and OR in the same filter.

Example:

contract status = Active
and
contract type = (Block of Time, Block of Money)
and
(code includes NBP or code includes TDEV)

There's no way to group the OR together as indicated above so the logic is wrong. Let me know if I am missing something about the way the filter dialog works.

-- Craig

Support Team
November 11th, 2020, 06:01 AM
Thank you for asking.

The OR condition is applied between both parts of the filter.

In your example the filter works as follows:

(contract status = Active
AND
contract type = (Block of Time, Block of Money)
AND
code includes NBP)

OR

(code includes TDEV)

In order to get the correct results, you should add conditions for Status and Type after the OR as shown below:

\forum_images\filter_or_condition.png

CraigYellick
November 11th, 2020, 08:08 AM
Thanks for the quick response. You folks are the best, really!

Got it: you have to repeat the AND portion for each OR. My filter is going to be pretty ugly (I included only a relevant portion) but now I know it can be done.

-- Craig

Support Team
November 11th, 2020, 08:17 AM
You are welcome and thank you for the kind words!