# Using Report Filters

Filters narrow the scope of your report. There are two kinds of filters: [standard filters][1] and [run-time filters][2]. Most document and object fields are available as filters. Reports with multiple reporting objects also allow [Relationship Constraint filters][3].

You can learn more about reports in <a href="/en/gr/3606/">Creating Reports</a>.

## Filters {#filters}

Standard filters are those that you create and apply in the report builder. At run-time, Vault simply filters based on your criteria. Some standard filters use run-time tokens, for example, a report could filter documents on _Approver equals "Current User"_.

### How to Create Filters

To add a filter to the report:

1. In the **Filters** section of the report builder, select a field from the drop-down.
2. Choose an operator and field value, if needed. You can also click the **Calculator** icon to open the **Formula Editor**, where you can either type in a formula for your filter or select from a list of options to create one. If you're filtering on a multi-select picklist, see details for [operators][5].
3. Add more filters by clicking the plus (**+**) icon to the right. You can delete a filter by clicking the minus (**-**) icon.

If you're adding a filter on a multi-select object-type document field, see [information on operators][5]. You can use up to 100 values in one of these filters.

#### Date and DateTime Operators

Vault calculates results using the user's timezone for all date and datetime report filters.

The functionality of the _is in the last_, _is in the next_, and _is not in the last_ operators differs between dates and datetimes.

For dates, Vault calculates the current time (now) and adds or subtracts the corresponding number of days. For example, running a report with a _Created Date is in the last 1 day_ filter at 12:00 PT on 1/18/25 returns all records created between 12:00 PT on 1/17/25 and 12:00 PT on 1/18/25.

For datetimes, Vault calculates the current date in the user's timezone and adds or subtracts the corresponding number of days. For example, running a report with an _Approval Date is in the last 1 day_ filter at 12:00 PT on 1/18/25 returns all records approved on 1/17/25 and 1/18/25.

## Relationship Constraint Filters {#relationship}

By default, multi-object report types (such as _Product with Document_ and _Study with Site and Product_) return all matching records for the primary reporting object, even if those records are not linked to related records, because primary reporting object records are not filtered out when applying filters to a secondary object. For example, a _Product with Document_ report returns a list of products that includes those without any associated documents. You can add a _Relationship Constraint_ filter to limit the report output to include only products with at least one related document.

## Advanced Logic

Advanced logic allows you to group filters together and add _AND_ or _OR_ operators between them.

Once two eligible filters or prompts have been added, _Add advanced logic_ appears below the filters. Click **Add advanced logic** to edit the formula using the numbers next to the filters. The _Validate_ button checks the syntax.

_AND_ operations are evaluated before _OR_ operations by default. You can use parentheses to determine which logic is evaluated first.

  <div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: Filters are locked while editing advanced logic. To modify or delete a filter, remove the advanced logic.</p>
    </div>
  </div>
</div>



### Limitations

The following limitations apply to advanced logic:

* The connector _OR_ can't be used between fields on different objects.
* Some filters are ineligible for advanced logic, and will not have a corresponding number. These filters include roles (_Approver_, _Owner_, etc.), formula fields, and relationship constraints.
* Reports that use advanced logic cannot be exported from the reports list page. You can, however, still export it while the report is open.
* Dashboard previews are not available for reports with advanced logic.

The following report types do not support advanced logic:

* Workflow
* Document relationship
* Binder
* R&U

## Run-Time Filter Prompts {#run-time}

Run-time filters prompt the report viewer to enter filter criteria. You create these filters in much the same way as any other filter, but you skip the final step of selecting a field value and select the **Prompt** checkbox.

For example, you'd create a report with the filter prompt _Created Date is in the range_. The report viewer would select an actual date range for the filter at run-time.

## Optional Prompts {#optional-prompts}

You can allow report viewers to skip filter prompts by selecting the **Optional** checkbox. At run-time, users can select the **Skip** checkbox to skip the filter prompt. Vault treats skipped filter prompts as _All_ and does not filter on the field. Report viewers can leave the filter prompt blank and filter on blank and null values.

For example, you create a report with the optional filter prompt _Subtype in_ and the filter prompt _Created Date is in the range_. The report viewer can select **Skip** on the _Subtype in_ prompt but must select a value in the _Created Date prompt_.

To skip all optional filter prompts at run-time, users can select the **Skip All** checkbox, which selects the **Skip** checkbox for every optional filter prompt. If one of the **Skip** checkboxes is deselected, the **Skip All** checkbox is also deselected.


### How to Define Filters & Prompts {#how-to-define-filters-prompts}


Reports with more records often take longer to run. This video details how to define filters and prompts during report creation.
<video controls width=860 height =504  preload="metadata">
    <source src="https://platform.veevavault.help/108e9b1d-559c-4d48-918b-1e4c5b5a533c/c8fd87bc-1df4-4f1d-84bf-639cdf61619b/c8fd87bc-1df4-4f1d-84bf-639cdf61619b_source__v.mp4#t=0.5" type="video/mp4" >
    
    <track
    label="English"
    kind="subtitles"
    srclang="en"
    src="/en/gr/assets/captions/25r1-defining-filters-and-prompts.vtt"
    default />
    </video>

<a href="/en/gr/676784/">Details</a>


## Filter Aliases {#aliases}

Using a filter alias allows you to relabel a filter to show a different label in the report viewer, exported report results, and dashboard.

Reports display filter aliases to viewers based on the viewer's assigned language. The assigned language of the editor who created the filter alias determines the language of the filter alias. If a filter alias is not defined for a viewer's language, the filter alias of the Vault's base language is displayed, or if no filter alias is available using the base language, the original filter is displayed without an alias.

Admins can localize aliases using <a href="/en/gr/13309/#bulk-translation">Bulk Translation export and import</a>.

### How to Add Filter Aliases

To add a filter alias:

1. While editing a report, expand the _Advanced Options_ section and select the **Enable filter and column aliases** checkbox.
2. Click **Add filter alias** in the **Filters** section for the associated filter.
3. In the _Add Alias_ dialog, enter an **Alias**. The token _{#####}_ represents the filter criteria value, for example, the date in _Created Date is before "1/1/2023"_.
4. Click **OK**.

### How to Edit Filter Aliases

To change or remove a filter alias:

1. Click **Edit** next to the filter alias to open the _Add alias_ dialog.
2. To change the alias, edit the **Alias** text as needed and click **OK**.
3. To remove the alias, click **Clear**.

## Relative Filters {#relative-filters}

Relative filters use tokens on run-time to dynamically populate the filter values based on various conditions, such as the user running the report and the current date. For date-based relative filters, Vault calculates results using the user's timezone.

For fields where the value is a specific user:

* **Current User**: User currently logged in and running the report

For fields where the value is a date:

* **Current Year**: Date within the current calendar year, for example, if today is _5/3/2025_, the filter value is _1/1/2025 - 12/31/2025_.
* **Previous Year**: Date within the previous calendar year, for example, if today is _5/3/2025_, the filter value is _1/1/2024 - 12/31/2024_.
* **Next Year**: Date within the next calendar year, for example, if today is _5/3/2025_, the filter value is _1/1/2026 - 12/31/2026_.
* **Current Quarter**: Date within the current calendar quarter, for example, if today is _5/3/2025_, the filter value is _4/1/2025 - 6/30/2025_.
* **Previous Quarter**: Date within the previous calendar quarter, for example, if today is _5/3/2025_, the filter value is _1/1/2025 - 3/31/2025_.
* **Next Quarter**: Date within the next calendar quarter, for example, if today is _5/3/2025_, the filter value is _7/1/2025 - 9/30/2025_.
* **Current Month**: Date within the current calendar month, for example, if today is _5/3/2025_, the filter value is _5/1/2025 - 5/31/2025_.
* **Previous Month**: Date within the past calendar month, for example, if today is _5/3/2025_, the filter value is _4/1/2025 - 4/31/2025_.
* **Next Month**: Date within the next calendar month, for example, if today is _5/3/2025_, the filter value is _6/1/2025 - 6/30/2025_.
* **Yesterday**: Date on the previous calendar day. For example, if today is _5/3/2025_, the filter value is _5/2/2025_.
* **Today**: Date of the current calendar day. For example, if today is _5/3/2025_, the filter value is _5/3/2025_.
* **Tomorrow**: Date of the next calendar day. For example, if today is _5/3/2025_, the filter value is _5/4/2025_.
* **Last Week**: Date within the previous calendar week. For example, if today is _5/3/2025 (Saturday)_, the filter value is _4/20/54 (Sunday) - 4/26/2025 (Saturday)_.
* **This Week**: Date within the current calendar week. For example, if today is _5/3/2025 (Saturday)_, the filter value is _4/27/2025 (Sunday) - 5/3/2025 (Saturday)_.
* **Next Week**: Date within the next calendar week. For example, if today is _5/3/2025 (Saturday)_, the filter value is _5/4/2025 (Sunday) - 5/10/2025 (Saturday)_.
* **Custom Period**: Custom date range relative to today defined by selecting an operator (such as _is in the last_) and entering a number and unit (such as _12 days_). The following relative operators are available:
  * **Is in the last**: Date within the specified number of days/weeks/months/years backward from the current date, including the current date. For example, if today is _5/3/2025_ and you select _Is in the last 2 months_, the filter value is _3/3/2025 - 5/3/2025_.
  * **Is in the next**: Date within the specified number of days/weeks/months/years forward from the current date, including the current date. For example, if today is _5/3/2025_ and you select _Is in the next 3 weeks_, the filter value is _5/3/2025 - 5/23/2025_.
  * **Is not in the last**: Date is not within the specified number of dates/weeks/months/years backward from the current date, including the current date. This could include dates in the past or in the future. For example, if today is _5/3/2025_ and you select _Is not in the last 2 years_, the filter value is _before 5/3/2023_ or _after 5/3/2025_.
* **Is in the last full**: Date within the specified number of days/weeks/months/years backward from the current date using full date units. For example, if today is _5/3/2025_ and you select _Is in the last full 2 quarters_, the filter value is _10/1/2024 - 3/31/2025_.



### Example

Gladys configures a report to show the average days each workflow takes to complete. She applies a filter to the report to only show workflows where the Workflow Owner is the user running the report.

When Teresa Ibanez runs this report, the Workflow Owner filter automatically updates to show her.

## Operators {#operators}

The following sections describe operator behavior for filters, prompts, and multi-select picklists.

### Contains

For report filters and prompts, returned results include only those where the field partially matches the filter value. Vault automatically applies a wildcard to the beginning and end of the query. When filtering on object text fields, select **contains (sensitive)** to return only results that match the case of the entered text, or select **contains (insensitive)** to ignore the case of the entered text and return results regardless of the case.

Example Filter: _Study > Study Name contains (sensitive) Alpha_

* **Match**: Study name is _Alpha Cholecap_
* **Match**: Study name is _123-Alpha-Cholecap_
* **No Match**: Study name is _ALPHA_

Example Filter: _Study > Study Name contains (insensitive) Alpha_

* **Match**: Study name is _Alpha Cholecap_
* **Match**: Study name is _123-Alpha-Cholecap_
* **Match**: Study name is _ALPHA_

The following limitations apply to the _contains_ operator:

* You cannot use the operator in report views.
* You cannot use the operator to filter on the following fields:
  * long text or rich text fields (use the [_search_][6] operator instead)
  * formula fields or conditional fields
  * multi-value picklist fields in raw objects
  * object reference fields
* You can only define three (3) filters using the _contains_ operator per report.
* The filter value must be between three (3) and 50 characters in length.

### Search {#search-operator}

The _search_ operator is available for Long Text and Rich Text fields. For report filters and prompts, returned results include those where the field contains the entered keywords with respect to any spaces or comma delimiters used between keywords. The keywords are case-insensitive and return results for stemmed and thesaurus matches. For example, train returns results that include _train_, _training_, _trainer_, and _trained_. Vault automatically applies a wildcard (*) to the end of single-term keywords. Multi-term keywords that use a space between words automatically include quotes surrounding the text.

Example Filter: _Corporate Initiative > Communication Plan search Stakeholder, VernBio Initiatives, Quality_

Vault evaluates the filter as follows: The _Communication Plan_ field contains _Stakeholder*_ OR _"VernBio Initiatives"_ OR _Quality*_

* **Match**: _Communication Plan_ contains _stakeholder_
* **Match**: _Communication Plan_ contains _Qualities_
* **No Match**: _Communication Plan_ contains _VernBio company_ but not _VernBio Initiatives_

### Equals

For multi-select picklists, returned results include only those where all filter values are in the field. The field may also contain additional values that are not in the filter.

Example Filter: _Approver equals Bruce Ashton, Tracy Lee_

* **Match**: Approvers are Bruce Ashton, Tracy Lee
* **Match**: Approvers are Bruce Ashton, Tracy Lee, Robyn Newsome
* **No Match**: Approver is Bruce Ashton

### In

For multi-select picklists, the "in" operator returns results that include at least one of the filter values.

Example Filter: _Approver in Bruce Ashton, Tracy Lee_

* **Match**: Approvers are Bruce Ashton, Tracy Lee
* **Match**: Approvers are Bruce Ashton, Tracy Lee, Robyn Newsome
* **Match**: Approver is Bruce Ashton

### Not Equal To

For multi-select picklists, returned results (documents, tasks, etc.) include only those where the field does not contain any of the filter values.

Example Filter: _Country is not equal to Fiji, New Zealand_

* **Match**: Country is United States
* **No Match**: Country is Fiji, United States
* **No Match**: Country is Fiji, New Zealand
* **No Match**: Country is Fiji

## Format Masks

The report filters, conditional fields, and prompts will behave according to any format masks configured by your Admin. For example, if you select **Phone Number** from the drop-down and enter "5555555555" as the field value, the format mask will modify your input to a designated format once you click away from the field, such as "(555) 555-5555".

Format masks can include email, phone number, and percentage fields. For fields configured with a <a href="/en/gr/52324/#format-mask-functions">Percent</a> format mask using the `Percent()` function, enter the actual percentage rather than a decimal (for example, "50" for 50% instead of ".5"). In addition, if you use a _starts with_ operator on a _Phone Number_ field, you must enter the number without any format, such as "5555555555".

The values entered in format mask fields will display in the report results under columns labeled with the specific format, such as _Formatted Number_, _Formatted Text_, or _Email_. For example, if you add a field with a percent format mask, the percent will display in the report results under the _Formatted Number_ column.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: Aggregate calculations and report groupings will continue to display the original value entered rather than the format mask value.</p>
    </div>
  </div>
</div>



## Inactive & Deleted Picklist Values

In some Vaults, you can filter by deleted or inactive picklist values. An Admin must <a href="/en/gr/1269/#deletion">enable this setting</a>.

 [1]: #filters
 [2]: #run-time
 [3]: #relationship
 [5]: #operators
 [6]: #search-operator
