Search logic and nested groups
When building an audience (or editing entry rules for an automation), a nested group allows you to add multiple filters and select if all or any of the criteria within the group have to be met.
Search logic
There are two primary search logics to choose between:
ALL: To be included people must mach ALL of the criteria you include in the search.
Search returns people who match criteria 1 AND criteria 2 AND criteria 3
ANY: To be included people must match ANY of the criteria you include in the search
Search returns people who match criteria 1 OR criteria 2 OR criteria 3
Most often you will want to choose the default ALL search logic for criteria you want to meet to be included and the default ANY search logic for exclusions. However, for more complex searches, you may need different logic for different criteria. You can do this using nested groups.
Nested groups
Normally for including people, you want them to meet all of the criteria and use the ALL logic. However, there may be some criteria, like area or campaign activity, where you want to include people that are in any of the areas or any of the campaigns, whilst keeping one filter true for all included in the audience. In cases like this, you put the different options into a nested group and apply to relevant logic to that filter.
In the example below, the audience will include all who are subscribed to email and are in any campaign listed - this audience brings together people who have taken part in either campaign, in one place:

When using groups make sure to sense check the number of people returned, if the number is different from your expectations, check over the logic using the summary on the page: