All sections / {current.section.title} / {current.chapter.title} / {current.topic.title} / {current.title} / {current.title} / {current.title} / {current.title}

Filtering Queries

Filter function within queries


When working with a query, you may only want to show specific items which are of use to your analytics. The filter tool makes it really quick and easy to find these specific entries, especially if you have a lot of data entries in your datasource.


Selecting A Stored Query

Firstly, you will need to navigate to the 'Stored Queries' section of the DAP.LIVE. You can do this by selecting 'Stored Queries' from the on the left-hand side bar. All of your pre-existing queries will be displayed on this page. Click the 'Edit' button next to the query that you want to use the filter tool on.





The Filter Icon

Now that you have opened up your query, you need to select the 'Filter' icon in the top right-hand corner of the toolbar.


Filter settings will appear and from there you can select the column that you want to search, and the condition and value that you want to filter by. Then click the 'Apply Filter' button in the bottom right-hand side of the filter settings bar. In this example, we have filtered our dataset so that it only returns entries with a TLD of .com.


Adding Multiple Filters

You can add another filter in order to further filter down your query. Click on the '+ filter' button at the bottom left-hand side of the filter settings bar.

Now you can add your second filter, again selecting the column that you want to search, and the condition and value that you want to filter by. If you select the 'All of the following apply' button in to top left-hand corner, then this applies the filters using a logical AND, meaning that the data entry has to meet the requirements of BOTH the first and the second filter in order for it to be shown. In this example we filtered our dataset to only display data entries with a TLD of .com AND a prefix containing the string 'love'.



If you select the 'Any of the following apply' button in to top left-hand corner, then this applies the filters using a logical OR, meaning that the data entry only needs to meet the requirements of EITHER the first filter or the second filter for it to be shown. In this example we filtered our dataset to display all data entries with a TLD of .com and all data entries that have a prefix containing the string 'love' as well as those entries that contain both.



Adding Filter Groups

You can add nested logic into your filters by adding a filter group. For example, we have added a filter that will only returns entries that have a TLD of 'art' AND a prefix that contains either 'love' OR 'scam', or both.


Saving Changes

Once you have applied the desired filter to your query and you are happy with the the data displayed below, you can save the changes made to your query in the bottom right-hand corner.



Top
DNSRF Corporate Logo - words and line shorter version
Search
{item._type | case 'page' 'Web page' 'blog/blog' publication 'adnewsfeed/news' 'News' 'docs/article' 'Docs'}{item.section.title} / {item.chapter.title} / {item.topic.title}  | {category.title}
{item.publishDate | date 'DD MMM YYYY' | append ': '}