# Advanced Report Filtering

## <span class="TextRun MacChromeBold SCXO183947872 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO183947872 BCX0">Filter Logic</span></span><span class="EOP SCXO183947872 BCX0"> </span>

<span class="TextRun SCXO183947872 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO183947872 BCX0">By default, multiple filters on a report are combined with AND, meaning a record must match every filter to appear. Salesforce reporting provides more flexibility in report creation by allowing you to specify and give priority to certain filters using **Filter Logic**. Thus feature lets you control how filters combine, using AND, OR, and NOT, including parentheses for grouping<span class="LineBreakBlob BlobObject DragDrop SCXO183947872 BCX0"><span class="SCXO183947872 BCX0"> </span></span></span></span>

### <span class="TextRun SCXO183947872 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO183947872 BCX0"><span class="LineBreakBlob BlobObject DragDrop SCXO183947872 BCX0"><span class="SCXO183947872 BCX0">Adding Filter Logic</span></span></span></span>

<span class="TextRun SCXO183947872 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO183947872 BCX0">After you start making a report of any object type, you can start adding the desired filters to the report on the filter tab. Once at least two filters are added here, you can use the dropdown arrow at the top right of the left panel to select filter logic.</span></span><span class="EOP SCXO183947872 BCX0"> [![Screenshot 2026-07-07 at 4.51.49 PM.png](https://bookstack.foundation.uri.edu/uploads/images/gallery/2026-07/scaled-1680-/IYpRx2ekIZCDAvWM-screenshot-2026-07-07-at-4-51-49-pm.png)](https://bookstack.foundation.uri.edu/uploads/images/gallery/2026-07/IYpRx2ekIZCDAvWM-screenshot-2026-07-07-at-4-51-49-pm.png)[![Screenshot 2026-07-07 at 4.52.40 PM.png](https://bookstack.foundation.uri.edu/uploads/images/gallery/2026-07/scaled-1680-/bjd9JeGw8CZ4JCR7-screenshot-2026-07-07-at-4-52-40-pm.png)](https://bookstack.foundation.uri.edu/uploads/images/gallery/2026-07/bjd9JeGw8CZ4JCR7-screenshot-2026-07-07-at-4-52-40-pm.png)</span>

### Filter Logic Formulas

Once the filter logic menu is open you will see that the default value of "1 AND 2" will be shown. (If you have more filters those would be listed with AND as well). This is the logic that is usually applied in reporting, where all filters must apply to the record for it to be included in the report. Each added filter is automatically assigned a number based soon order added, this can be grouped in the formula using parentheses.

**Accepted terms:** AND, OR, NOT

<table border="1" id="bkmrk-example-record-will-" style="border-collapse: collapse; width: 47.619%; height: 119.188px;"><colgroup><col style="width: 28.7698%;"></col><col style="width: 71.2302%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Example**  
</td><td style="height: 29.7969px;">**Record will show when:**</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">1 AND 2</td><td style="height: 29.7969px;">Both filter 1 and 2 apply.</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">1 OR 2</td><td style="height: 29.7969px;">Either filter 1, filter 2, or both apply.</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">NOT(1)</td><td style="height: 29.7969px;">Filter 1 does not apply.</td></tr></tbody></table>

## <span class="EOP SCXO183947872 BCX0"><span class="TextRun SCXO160617261 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO160617261 BCX0">Cross Filters</span></span></span>

<span class="EOP SCXO183947872 BCX0"><span class="TextRun SCXO160617261 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO160617261 BCX0">Cross filter is another feature of salesforce reporting that allows you to filter a report based on the presence or absence of related child records. <span class="TextRun SCXO40806063 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO40806063 BCX0">Unlike a standard filter, a Cross Filter does not let you display fields from the child object on the report, it only has the ability to determine whether the parent record qualifies.</span></span><span class="EOP SCXO40806063 BCX0"> </span>  
</span></span></span>

<span class="EOP SCXO183947872 BCX0"><span class="TextRun SCXO160617261 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO160617261 BCX0">**Examples**:</span></span></span>

1. <span class="EOP SCXO183947872 BCX0"><span class="TextRun SCXO160617261 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO160617261 BCX0">Show accounts with attached opportunities</span></span></span>
2. <span class="EOP SCXO183947872 BCX0"><span class="TextRun SCXO160617261 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO160617261 BCX0">Show accounts without contacts</span></span></span>

### <span class="EOP SCXO183947872 BCX0"><span class="TextRun SCXO160617261 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO160617261 BCX0">Adding a Cross Filter</span></span></span>

<span class="EOP SCXO183947872 BCX0"><span class="TextRun SCXO160617261 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO160617261 BCX0"><span class="TextRun SCXO183947872 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO183947872 BCX0">After you start making a report of any object type, you can add a cross filter by switching to the filters tab and using the dropdown menu to select "Add Cross Filter". This will open a menu allowing you to specify if you want to show records with or without a secondary object attached. </span></span></span></span></span>

<span class="EOP SCXO183947872 BCX0"><span class="TextRun SCXO160617261 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO160617261 BCX0"><span class="TextRun SCXO183947872 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO183947872 BCX0">[![Screenshot 2026-07-07 at 4.50.26 PM.png](https://bookstack.foundation.uri.edu/uploads/images/gallery/2026-07/scaled-1680-/F4lhyOCJ5fWkkgSc-screenshot-2026-07-07-at-4-50-26-pm.png)](https://bookstack.foundation.uri.edu/uploads/images/gallery/2026-07/F4lhyOCJ5fWkkgSc-screenshot-2026-07-07-at-4-50-26-pm.png)[![Screenshot 2026-07-07 at 4.49.01 PM.png](https://bookstack.foundation.uri.edu/uploads/images/gallery/2026-07/scaled-1680-/5uoDhHRGhJmgMzDk-screenshot-2026-07-07-at-4-49-01-pm.png)](https://bookstack.foundation.uri.edu/uploads/images/gallery/2026-07/5uoDhHRGhJmgMzDk-screenshot-2026-07-07-at-4-49-01-pm.png)</span></span></span></span></span>

<span class="EOP SCXO183947872 BCX0"><span class="TextRun SCXO160617261 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO160617261 BCX0"><span class="TextRun SCXO183947872 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO183947872 BCX0">After applying the cross filter and running the report, you should see that the records not matching your cross filter are no longer appearing. </span></span></span></span></span>

## <span class="EOP SCXO183947872 BCX0"><span class="TextRun SCXO160617261 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO160617261 BCX0">Lock Filters</span></span></span>

<span class="EOP SCXO183947872 BCX0"><span class="TextRun SCXO160617261 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO160617261 BCX0">If you are planning on sharing a record with others, a useful security feature provided by salesforce is the ability to lock filters. <span class="TextRun SCXO209318427 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO209318427 BCX0">Normally, anyone viewing a report can change the filter values on the run page, this can be prevented on more essential reports by simply checking the locked checkbox</span></span></span></span></span>

### <span class="EOP SCXO183947872 BCX0"><span class="TextRun SCXO160617261 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO160617261 BCX0">How to Lock a Filter</span></span></span>

<div class="OutlineElement Ltr SCXO123533087 BCX0" id="bkmrk--1"></div><div class="WACImageContainer Selected OnlyImageSelected OnlyImageSelectedMove SCXO123533087 BCX0" id="bkmrk-click-the-filter-you" role="presentation">Click the filter you want to lock to edit it (same menu is accessed when creating new filter), and in the bottom left you simply check the "Locked" checkbox. Afterwards just hit apply and your changes will be saved preventing anyone from editing the filter on the run reports page.</div><div class="WACImageContainer Selected OnlyImageSelected OnlyImageSelectedMove SCXO123533087 BCX0" id="bkmrk--2" role="presentation">[![lock-filter](https://bookstack.foundation.uri.edu/uploads/images/gallery/2026-07/scaled-1680-/BKB8fvSYV0fYvTwZ-screenshot-2026-07-07-at-4-55-37-pm.png)](https://bookstack.foundation.uri.edu/uploads/images/gallery/2026-07/BKB8fvSYV0fYvTwZ-screenshot-2026-07-07-at-4-55-37-pm.png)</div><div class="WACImageContainer Selected OnlyImageSelected OnlyImageSelectedMove SCXO123533087 BCX0" id="bkmrk--3" role="presentation"></div>