Cross Filters and Filter Logic
In Salesforce reporting, Cross Filters and Filter Logic are two powerful tools that Platform Administrators use to refine report results beyond simple field-based filters, and both are key topics in the Administrator II exam's Data and Analytics Management section. Cross Filters let you filter a report based on the presence or absence of related child records, using a 'WITH' or 'WITHOUT' condition. For example, you could build an Accounts report showing 'Accounts WITHOUT Opportunities' to find accounts that have never had a deal, or 'Contacts WITH Cases' to identify customers who have logged support issues. You can also add sub-filters on the child object, such as 'Accounts WITH Opportunities where Stage equals Closed Won.' Key limits to remember: a report can have up to three cross filters, each cross filter can have up to five sub-filters, and cross filters are available on all report formats. They work on the related object, not fields from it, so they cannot display child object fields in the report itself. Filter Logic, on the other hand, controls how multiple standard field filters combine. By default, Salesforce applies AND logic between all filters, meaning every condition must be true. Filter Logic allows you to use AND, OR, and NOT operators with parentheses to create complex expressions, such as '(1 AND 2) OR 3' or '1 AND NOT 2'. This is essential when you need records that meet either of two criteria rather than both. Important rules: every filter number must be referenced in the logic, filter logic applies only to standard field filters (not cross filters or row limits), and you cannot use filter logic with locked filters in dashboards. Together, these features help administrators answer nuanced business questions, surface data gaps, and build accurate, actionable reports without needing custom development or exporting data externally.
Cross Filters and Filter Logic in Salesforce Reports: A Complete Guide for the Advanced Administrator Exam
Reports are only as useful as the records they return. A report that shows every Account when the business only wants Accounts without Opportunities, or every Case when the stakeholder needs Cases with at least one escalated comment, forces users to export to spreadsheets and manually scrub data. Cross Filters and Filter Logic are the two native tools that let an administrator express sophisticated inclusion and exclusion rules directly inside the report builder, with no code, no custom fields, and no formula hacks.
For the Salesforce Advanced Administrator exam, this topic sits inside the Advanced Data and Analytics Management domain (roughly 10% of the exam). Questions on cross filters and filter logic are popular because they test whether you truly understand the difference between filtering on the primary object and filtering on related objects, and whether you can translate a business requirement written in plain English into the exact filter configuration that produces the right result. Scenario-based items in this area are frequently missed by candidates who memorise features without understanding the underlying data relationships.
Part 1: What Are Field Filters, Filter Logic, and Cross Filters?
Before diving into the advanced tools, it helps to understand the three layers of filtering available in a Salesforce report.
1. Standard Field Filters
These filter on fields that are available in the report type. For example, on an Opportunity report you can filter Stage equals Closed Won or Amount greater than 10000. Field filters only operate on fields that exist in the report's object hierarchy (the primary object and any related objects defined in the report type).
2. Filter Logic
By default, when you add multiple field filters, Salesforce joins them with AND. Every condition must be true for a record to appear. Filter Logic lets you override this default by writing a Boolean expression using the filter row numbers, such as 1 AND (2 OR 3). This gives you fine-grained control over how conditions combine.
3. Cross Filters
A cross filter filters the records of the primary object based on whether they have (or do not have) related child records. The classic example is Accounts WITH Opportunities or Accounts WITHOUT Cases. Critically, a cross filter does not require the child object's fields to be part of the report type, and it does not add the child records to the report output. It simply uses the existence (or non-existence) of related records as a condition for including the parent record.
Part 2: How Filter Logic Works
When you add filters in the report builder (Lightning Experience), each filter is assigned a number in the order you created it. Once you have at least two filters, the Add Filter Logic option becomes available in the Filters panel.
Supported operators:
• AND – both conditions must be true
• OR – at least one condition must be true
• NOT – negates a condition
• Parentheses ( ) – group conditions and control order of evaluation
Example scenario:
A sales manager wants a report of Opportunities that are either in the Negotiation stage OR have an Amount over $100,000, but in all cases must be owned by the Enterprise team.
Filters:
1. Owner Role equals Enterprise Sales
2. Stage equals Negotiation/Review
3. Amount greater than 100000
Filter Logic: 1 AND (2 OR 3)
Without the parentheses, the expression 1 AND 2 OR 3 would be ambiguous and Salesforce would reject it or evaluate it differently than intended. Parentheses are essential whenever you mix AND and OR.
Important rules and limitations for Filter Logic:
• Every filter number you have defined must appear in the logic expression at least once. You cannot leave filter 3 out of the expression if a third filter exists.
• You cannot reference a filter number that does not exist.
• Filter logic applies only to field filters. It does not apply to cross filters, row limit filters, or the standard scope filters (such as Show Me / date range).
• If you delete a filter, the remaining filters are renumbered and you must update the logic expression.
• Filter logic is not available in joined reports in the same way; each block in a joined report has its own independent filters.
• You can use NOT, for example 1 AND NOT 2, to exclude records matching a condition. This is often cleaner than using a not equal to operator on a multi-value field.
Part 3: How Cross Filters Work
Cross filters address a question that field filters cannot: does this record have related records of a certain type?
In the Lightning report builder, open the Filters panel, click the dropdown arrow next to Filters, and choose Add Cross Filter. You then configure three elements:
1. The primary object – this is the object whose records you are filtering (e.g., Accounts).
2. WITH or WITHOUT – the condition type. WITH returns primary records that have at least one matching child record. WITHOUT returns primary records that have zero matching child records.
3. The related (child) object – the object whose existence is being checked (e.g., Opportunities, Cases, Contacts, Activities, or a custom child object).
Sub-filters
Once a cross filter is in place, you can add up to five sub-filters on the child object. Sub-filters let you narrow the child records being checked. For example:
Accounts WITH Opportunities where Opportunity Stage equals Closed Won and Close Date equals This Year
This returns only Accounts that have at least one Closed Won Opportunity closing this year. Accounts with only open or lost Opportunities are excluded. Sub-filters are always combined with AND; you cannot apply OR logic within a cross filter's sub-filters.
Key behaviours to remember:
• A cross filter does not add child object fields or rows to the report. If you want to see the Opportunity names, you still need a report type that includes Opportunities.
• A cross filter can reference child objects that are not part of the report type. This is one of its biggest advantages. An Accounts report type does not include Cases, but you can still build Accounts WITHOUT Cases.
• The child object must be related to the primary object through a lookup or master-detail relationship where the primary object is the parent.
• You can add up to three cross filters per report.
• Cross filters are available on standard and custom report types, but the available child objects depend on the primary object of the report type.
• Cross filters are combined with each other and with field filters using AND. There is no way to apply filter logic across cross filters.
• Cross filters can be used in reports that feed dashboards, and the dashboard will reflect the cross-filtered result set.
• Cross filters may be slower to run on very large data volumes because they require a subquery against the child object.
Part 4: Common Business Scenarios and the Correct Solution
Scenario A: Find Accounts that have never had an Opportunity.
Solution: Account report, cross filter Accounts WITHOUT Opportunities. A field filter cannot do this because an Accounts and Opportunities report type only returns Accounts that have Opportunities (or, with the "with or without" report type variant, cannot easily isolate the empty ones in a clean way).
Scenario B: Find Contacts who have not been contacted (no Activities) in the last 90 days.
Solution: Contact report, cross filter Contacts WITHOUT Activities, sub-filter Date greater or equal LAST 90 DAYS. Note the subtlety: a Contact that had an activity 120 days ago but none since is still returned, because the sub-filter restricts which activities count.
Scenario C: Find Opportunities that are Closed Won, or are in Proposal with Amount over $50,000, excluding those from the Partner channel.
Solution: Opportunity report with field filters:
1. Stage equals Closed Won
2. Stage equals Proposal/Price Quote
3. Amount greater than 50000
4. Lead Source equals Partner
Filter Logic: (1 OR (2 AND 3)) AND NOT 4
Scenario D: Find Accounts that have Opportunities but have no Contacts.
Solution: Account report with two cross filters: Accounts WITH Opportunities and Accounts WITHOUT Contacts. Both cross filters are applied together.
Scenario E: Find Cases that have at least one Case Comment marked Public.
Solution: Case report, cross filter Cases WITH Case Comments, sub-filter Public equals True.
Scenario F: A user needs to see Opportunity records with product details only if the Opportunity has Products with a specific Product Family.
Here a cross filter is not the right tool, because the user needs to see the Product data. The correct solution is an Opportunities with Products report type and a field filter on Product Family. Recognising when a cross filter is inappropriate is as important as knowing when it is appropriate.
Part 5: Cross Filters vs. Report Types – Knowing the Difference
Candidates often confuse the role of report types with cross filters. The distinction is:
• A report type determines which objects and fields are available to display in the report, and whether the relationship is "with" (inner join) or "with or without" (outer join).
• A cross filter determines which primary records are included based on related record existence, without displaying related data.
If a question asks to display related data, think report type. If a question asks to include or exclude parent records based on children, think cross filter. If a question asks to combine multiple conditions on the same object with OR or NOT, think filter logic.
Part 6: Limits Summary
• Maximum cross filters per report: 3
• Maximum sub-filters per cross filter: 5
• Maximum field filters per report: 20
• Sub-filters within a cross filter: always AND
• Cross filters and field filters: always AND with each other
• Filter logic: applies to field filters only, supports AND, OR, NOT, and parentheses
• Every field filter must be referenced in the filter logic expression
Exam Tips: Answering Questions on Cross Filters and Filter Logic
Tip 1: Look for the words "with" and "without" in the scenario.
When a question describes records that have or do not have related records ("Accounts with no open Cases", "Leads that have never been emailed", "Contacts without Campaign Membership"), the answer almost always involves a cross filter. Field filters alone cannot evaluate the absence of related records.
Tip 2: Watch for "OR" and "either/or" language.
If the requirement says records must meet condition A or condition B, default AND filters will not work. The answer involves filter logic. Be ready to recognise the correct expression, especially the correct placement of parentheses.
Tip 3: Remember that cross filters do not display child data.
If an answer option suggests using a cross filter to show related object fields, it is wrong. Cross filters only decide inclusion or exclusion. If the user needs to see the child data, the answer is a different report type or a joined report.
Tip 4: Know that filter logic does not apply to cross filters.
A distractor answer may suggest writing filter logic like 1 OR 2 where 2 is a cross filter. This is not possible. Cross filters are always ANDed with everything else.
Tip 5: Memorise the limits.
Three cross filters per report and five sub-filters per cross filter appear regularly. If a scenario needs four separate related-object conditions, one solution is not possible with cross filters alone and the exam may be testing whether you know that boundary.
Tip 6: Pay attention to sub-filter date conditions.
Questions like "Accounts with no Activities in the last 30 days" are testing whether you understand that WITHOUT Activities plus a sub-filter on Activity Date restricts the activities being counted, not the Accounts. An Account with an old activity is still returned. Read the time-based wording carefully.
Tip 7: Evaluate every option against the exact requirement.
Exam distractors often present a solution that returns most of the right records but not exactly. For example, using a "with or without" report type and filtering where Opportunity Name is blank is a workaround for "Accounts without Opportunities", but the cleaner and intended answer is the cross filter. Choose the most direct native feature.
Tip 8: Eliminate code-based or custom-field answers when a declarative report feature exists.
If an option proposes creating a roll-up summary field, a formula field, or a flow just to identify Accounts without Cases, and another option proposes a cross filter, the cross filter is almost always the expected answer. The Advanced Administrator exam rewards knowing the native, lowest-effort solution.
Tip 9: Check that filter logic references every filter.
If an answer shows four filters but the logic expression only mentions three, it is invalid. Salesforce requires all filter numbers to be used.
Tip 10: Practise translating English into Boolean.
Before the exam, write out several sentences such as "closed won deals from this year, or any deal over $1M, but never from the Reseller channel" and convert them into numbered filters and logic strings. The speed at which you can do this under time pressure will directly improve your score on this domain.
Final Thoughts
Cross Filters and Filter Logic are deceptively simple features that unlock powerful reporting without code. Mastering them means understanding three ideas: field filters evaluate fields on the primary object, filter logic controls how those field filters combine, and cross filters evaluate the existence of related child records. When you read an exam scenario, identify which of these three mechanisms the requirement actually needs, recall the limits and the AND-only behaviour of cross filters, and choose the most direct declarative solution. With that framework, questions in this area become some of the most predictable points you can earn on the Advanced Administrator exam.
Admin II - Cross Filters and Filter Logic Example Questions
Test your knowledge of Cross Filters and Filter Logic
Question 1
At Universal Containers, sales operations wants one Accounts report listing every account that is either in the Healthcare industry or has no opportunities at all. The administrator adds a field filter for Industry equals Healthcare and a cross filter of Accounts without Opportunities, then enters the filter logic 1 OR 2. The report saves, but it returns only Healthcare accounts that have no opportunities. What explains this behaviour?
Question 2
Universal Containers needs an Accounts report that shows one row per account. It must list only Hot-rated accounts that have at least one opportunity that is Closed Won, over $100,000, and closing this fiscal year. Many accounts have a large open opportunity and a separate small Closed Won opportunity, and those accounts must not appear. How should the administrator configure the report?
Question 3
At Universal Containers, the customer success director wants an account list showing each account with a Closed Won opportunity this fiscal year that also has at least one High priority case. The list must show exactly one row per account and be built on the standard Accounts report type. The administrator is weighing several proposals. Which approach should the administrator recommend?