Skip to main content

Filter basics

Filters are a powerful way to refine your search results to include only the specific data you wish to examine.

Written by Connor Stallings
Updated this week

When you add a value to your search in Trends AI, it immediately functions as a filter. You have the ability to define filters directly on tables and views. When you apply a filter, it is added to the data source, ensuring that the resulting data set contains only rows that meet the parameters you have specified. To save time, you can also set filters to be automatically applied to every search using a particular data source. For example, you might want to automatically exclude archived giving records from your search results. Instead of having to type status = archived for every search, you can define it as a permanent filter. The more complex a filter is, the more helpful it is to set it directly on the data sources.


To add a filter using the search bar:

  1. Click in the search bar and type the value or values you wish to include in your search. Typing a value in the search bar acts as a filter:
    ​

    You can also use keywords related to date and time, such as yesterday, after, and next month, to filter your search results.
    ​

  2. Click outside of the search bar or press Enter to apply your filter.

Simple filters are applied to an individual Chart, while Board filters can be applied to all Charts on a Board. You can find more detailed information about [Board filters in the Boards section].


Where Filters Appear in Trends AI

As seen in a simple search, filters appear as gray boxes within the search bar:
​

In a Chart or a Board, filters appear directly beneath the title.

If you notice that your search or Board does not display all the data you expected, check for existing filters. You can remove any filters by clicking the X to view the complete data set.

Note: Filtering on null and empty values is handled as a special case. You can learn more about how these values are represented and how to filter for them in [About filtering on null, blank, or empty values].

Simple Filters

Simple filters can be applied to searches in a few different ways. You can use the search bar or select Filter from the column header or axis label. You can apply simple filters to your search regardless of whether it displays a table or a chart. Your filters will remain part of the search even if you change the visualization type.

When adding a filter from the More menu icon ("..."), either in the column header or by selecting a chart axis, numeric and text columns give you the option to include or exclude values and a checkbox selector for the values. If the column contains a date, you will see a calendar selector when applying a filter. This is also where you can apply bulk filters.

Bulk Filters

If you are working with a large table containing thousands of rows, you may find bulk filters useful. This feature allows you to quickly paste in a list of filter values to either include or exclude, without having to manually select the checkbox next to every individual value in the filter selector.

Bulk filters are highly effective when dealing with extensive tables, making it simple to filter a large list of values easily. For instance, if your manager sends you a list of specific products via email that you need to search for, you can copy and paste those values directly into the bulk filter box. This allows you to rapidly generate a report or chart that includes only the items of interest.

You can create a bulk filter by pasting a list of values, separated by commas, semicolons, new lines, or tabs, into the bulk filter box. This ability makes repeatedly searching large lists of filters much more efficient.

Cascading Filters

Trends AI applies specific logic when an object has more than one filter, known as cascading filters. For example, you might have a table-level filter, such as country=US. While running a search on that table, you may want to add filters for specific cities. By default, Trends AI will limit your possible filter values to only cities within the United States, adhering to the existing table-level US filter. The first filter you apply to an object always restricts the available filter values you see for subsequent filters. This is important because if you have a country=US filter and attempt to add a city=Paris,France filter, for example, the result will be no data found because the conditions contradict each other.

Show unfiltered values

When you access the filters modal in a search by selecting the filter icon, you will see an option to Show unfiltered values. This option directly relates to cascading filters. When you add a second filter to a search, Trends AI initially shows only values that exist within the scope of the first filter you applied. You might need to see all possible values without removing the initial filter.

For example, if you have a country=US filter on your search but want to see data for Paris, France. When you open the filters modal for city, Paris, France will not appear initially. You can select Show unfiltered values to make it visible and then select Paris, France. You can then delete the country=US filter. This feature is particularly useful if you have many filters applied to an object or if you are uncertain about the range of values in your data columns.

Change the Filter Order

If your Chart or Board contains multiple filters, you can reorganize them in the filter bar to present them in a logical and coherent order. This improves readability and makes it easier for users to understand and interact with the filters on the Chart or Board. Changing the filter order only affects the visual display and has no impact on filter precedence or the order in which they are processed. The filter order will also not be changed in the underlying TML file.

To change the order of filters in the filter bar, follow these steps:

  1. For a Board, select the Edit button in the upper right corner of the Board you wish to modify. If this button is grayed out, you do not have the necessary edit privileges for the Board. To resolve this, please contact your administrator or the Board's creator. For a Chart, there is no specific edit mode, so this step is not necessary.

  2. Select any filter from the filter bar, and drag and drop it to a new location.

  3. Select Save in the upper right corner of the Board. For a Chart, select the More Options menu and choose Save.
    ​

Did this answer your question?